Solution really depends on the guitar.
1) Is the neck straight?
Check neck bow and make sure the neck is straight by using either a straight edge or by sighting down the neck from the headstock (less reliable than a straight edge). If it's too curved twist the truss rod a quarter turn clockwise, it shouldn't need more than that. If there's a backbow then turn the truss rod a quarter turn anticlockwise for more bow.
If you need to do more than half a turn then take it to a luthier as you'll have a serious neck bow issue.
Next, you'll need to check string height. Lower the strings until you get fret buzz and then raise the string saddles by a half turn each screw until the strings just start to buzz in some places but not others.
2) Where is it buzzing?
a) If it's buzzing above the 12th fret and you've already straightened the neck and it's a bolt on neck then you'll need to adjust the neck angle. Take the neck off and remove a shim or replace it with one that isn't so thick. For Fender/Musicman microtilt necks, you won't need to remove the neck or slacken the strings, just tweak using an allen key in the hole in the neck plate. Otherwise, reattach neck, tune strings to pitch and check for buzz in the same places. You should notice a difference. If it's neck through or glued in then get a luthier to look at it.
b) If it's buzzing below the 3rd fret then your nut is too low. You'll need a new nut and cut string slots in it that are slightly higher than the ones at present. It's best to take it to a luthier as it needs super thin files and good eyesight.
c) If you're getting buzz on single frets then you'll need a fret level - get a reputable luthier to do it because if you take off too much metal from the frets the guitar will need a complete refret.
d) If you're getting buzz on one side of a set of frets further down the neck and then on the other side further up the neck then you'll have a neck twist. The prognosis isn't great but a skilled luthier might be able to steam the neck straight or replace the fingerboard and install stiffening to correct the twist. It won't be cheap.
Otherwise, is it comfortable? Is there fret buzz relatively consistently across the whole fingerboard? If so, raise the string saddles until the buzzing just disappears and your guitar should be 80% set up. With the exception of intonation.