For most getting the best fit for the bike is a mystery but there are 4 easy steps to get yourself comfortable. If you are looking to buy a bike I would suggest checking our bike sizing chart first and return to this post once you have the bike with you. Here is how it rolls:
On ladies bikes without horizontal top tube going between the seat and the handlebars, you can skip this step.
There should be only a slight bend to the knee when your foot is on the pedal in the bottom position. You want to get your seat at the height where your leg is almost completely straight when you are sitting on the seat and the pedal is at it's lowest position. There should be a slight bend to the knee but only just. This will maximise your power, extend endurance and minimise fatigue. It is a common misconception that one should be able to sit on their seat and still firmly reach the ground. If you can sit on your seat and touch your feet to the ground other than on tip toes, your seat is too low.
You want your seat to be pretty much in level. Too much forward tilt, and you'll feel like you're sliding forward, too much backward angle, and you won't be able to get any power. And you'll probably feel like you're slipping off. You really want to make yourself comfortable. When on a bike seat, your weight should be by the same spots that you feel when you sit upright on a hard firm surface. You can also move the seat forward and backward in relation to the seat post. This will help make sure you're comfortably centring your weight in the right places.