I am a beginner and want to buy a lens for my Nikon D5200. What lens will give me the best results for fashion photography?
A "cookie-cutter" lens for beginning would be a 35/1.8 in my opinion. It is not really expensive and it is more versatile than a 50 mm lens on an APS-C sensor.
Once you are comfortable, I'd say you should buy a zoom lens, in order to have more possibilities with the background of the model.
This is another of those cases where the real answer is a lot more complicated than telling you a lens to buy. Fashion photography in particular is very strongly about staging.
Even if you're using natural light, you will need to learn to understand and control that light. For many beginners, bad experience with cheap on-camera flash drives an aversion to controlled lighting — but if you are really serious about portraiture of any sort, I really encourage you to overcome that fear. At the very least, learning to work with flash is an easy way to become much, much more aware of what is going on with natural light.*
Beyond that, there's the fashion itself — clothing, hair, makeup, setting, and of course the models. This isn't my area so I won't even pretend to go into that, but the point is that lens choice has little to do with what's really important here.
But to get to the question itself: you'll really want a wide range of lenses. You might start with Which focal-length lens is usually used for portrait photography, and why?, and the general guidelines for portraits. But, you may also want a long telephoto lens to experiment with perspective compression and with very shallow depth of field — or at the other end, wide angle lenses are often used for fashion editorials. Basically, there is no single answer.
The best advice I can give is to start with the 18-55mm kit lens that comes with the camera you are buying, or the 35mm Paul Picard recommends (that's a nice, fast, low-cost normal lens for Nikon APS-C). Work on some of the above, and get practice with what you have, and then you'll be able to figure out what you're missing for what you want to do.
* We can help with getting started in lighting! See everything under Lighting Basics. And as everyone recommends, go through Strobist 101 or 102, and then ask here about anything more you need to know.