Adjust the height
There is not a direct correlation between your height and the frame size since anyone has a different anatomy. Some people have long legs and a compact bust, others have short legs and long arms, or long legs and arms, etc.... so I can give you general indications only. Considering the frame size in inches, the 14-16 is suitable for a person shorter than 1,60 m., 16-18 for those around 1,70 m. and 18-20 for people around 1,80 m.
Once you have chosen the frame, the other components involved in the seat position are basically three: the saddle, adjustable in height, tilt and declivity; the handlebar, adjustable in height and declivity through the stem that connects it to the fork; and then the crank arms. If yours is a second-hand bike and you don't want to replace any components, the best thing is adjusting the saddle. We can regulate its height by loosening the screw that secures the steerer tube to the frame. To determine the right position you can make a simple test: put on the shoes you are going to use for your rides. Then saddle up and place your heel on the pedal. Helped by a friend try pedaling backwards until the point in which the cranks is down and parallel to the vertical tube of the frame. In this position, your legs must be completely stretched but without muscle tension. After adjusted the saddle height, keep pedaling backwards, if you notice the stretching is not complete, raise the saddle; on the contrary, if your hips swing while pedaling, lower the saddle. Basically, the saddle must be adjusted in a horizontal position and perpendicular to the ground, but to feel a little more comfortable in uphill rides you can slightly tilt the saddle forward, being in mind that you will feel a little uncomfortable downhill.
Adjust the lenght
Now you have to focus on the length of your bicycle. Here I'll try to give you some empirical notions about positioning: we could act on the saddle moving it forward or backward by adjusting the screws below. Another possibility to adjust the length between saddle and handlebar is the stem replacement, since there are many different sizes on the market. To evaluate the moving position, sit in the saddle and grab the handlebar. In principle, by looking down to the front wheel you should see the hub slightly over the line of the handlebar. Elbows should be slightly inclined while grabbing the handlebar but without feeling slouchy in the saddle or too high in the saddle. Further adjustments can be made by inserting a thikness under the stem junction to lift the handlebar, or in the length of crank arms where pedals are fixed.
However, practice is much more important than any word, and particularly the “feeling” you create with your vehicle: after the adjustments, go run for some kilometers and you'll immediately notice if you have improved or worsen your sensations and comfort. If you have some medical problems such as chronic backaches, sciatica and others and you don't want to give up this wonderful sport, namely mountain biking, go consult an expert who will suggest you the best solution to continue your MTB experience.