Setup can involve several things, but the most important here are:
1. Adjustments to the slots in the nut and the height of saddle. You want the strings to be high enough above the frets that it does not buzz when you play it, but close enough to the frets that you don't have to push down too hard to fret. (This is typically collectively referred to as "the action.") If the action is too high, you also tend to get intonation issues when you are fingering frets that are higher up the fretboard, as pushing the string down to the fretboard makes too big of an angle relative to the normal flat string.
2. Ensuring that all the frets are level with each other, the entire way up and down the fretboard. Failing to do so will usually lead to buzzing when you finger certain strings on certain frets.
3. Ensuring that the fret ends are well filed. Failing to do so leads to sharp fret ends sticking out, which can be quite uncomfortable while playing.
Pretty much every manufacturer does at least a little bit on all three before it leaves the factory, but how much is "a little bit" can vary wildly. When you buy an instrument from a reputable dealer, they make all these adjustments before the instrument reaches you. The difference between a well set up cheap instrument and a poorly set up expensive instrument is night and day; and it favors the well set up one!
All of these are adjustments that you, the end user *can* do, with some patience, experience, and the right tools. It is all relatively straightforward, but that is not the same thing as easy! Done poorly, it can lead to an instrument that is practically unplayable. (It can usually be fixed by replacing the nut and or saddle.) Those who are really good at it (like Mim from Mim's Ukes) are practically artists.