There are many mixtures of materials that can be used successfully. I would tend to say that the common element in any really good finish is sanding. You simply can't get away without careful sanding between coats. That and a fanatical devotion to cleanliness. Keeping the area really clean and managing dust is crucial.
Sanding sealer is often prescribed to fill the pores in open grained wood. You can use it, but in truth you can get away without, but you will end up applying some number of additional coats (and sanding back each time) before you achieve a filled pore structure of the wood. However the result can be superior since many sanding sealers do little to enhance the wood.
MDF needs treating in a similar manner. You need to totally fill and isolate the fibrous structure. An initial coat of thinned varnish is a good idea. Then sand back, and repeat, so it goes.
As you approach the final coats you should become aware that you are sanding back what is for all intents just a perfectly smooth layer of varnish. Not until this is the underpinning layer will you get a perfect glossy coat. If there is the slightest trace of grain, fibre, or any imperfection (such as sanding scratches), you will need to keep adding layers. Done right you actually don't need too many coats, but if the finish is unsatisfactory, you know what to do. 4 coats is a minimum.
There are a huge number of possible varnishes. Ranging from traditional "real" varnishes to all the modern polymer. Personally I like a two pack polyurethane. But this is expensive in all respects. You need special thinner, and it will kill your brushes. 7008 flooring varnish works very well. Seriously hard wearing too. I have never had much luck with the water based ones. Then again I haven't tried any in years, they may be vastly better.
Finally, you can always try spraying. All of the preceding applies, but you can often achieve a good result, especially for smaller pieces with a spray-can of varnish. The pro's of course will often spray a 2 pack polyurethane and be done.