The first question you have to answer is this: how are you going to use your bicycle? The type of riding you will be doing and the roads you want to take will determine the characteristics of the bike. If you want to ride to work every day you’ll want a city bike. Riding on forest trails all weekend? You definitely need a mountain bike. For big distances choose a road bike. Assessing what you want to do will set you in the right direction. The next step is finding a store to buy from and deciding on the amount of money you’re willing to spend. If you’re not familiar with the cycling world you should ask for help at the store. They will help you finding the right fit for your needs.
Before buying the bike you like, give it a test run. Make sure you’re comfortable and pedaling is easy for you. You’re going to ride that bicycle for years to come so it has to be perfect. Sizing and fitting are crucial at this point. Again, this is something the sales people can help you with. Choosing the correct frame size, saddle height and handlebar settings are the most important for your comfort. Another thing you should pay attention to are the different accessories coming with the bike. You should have some basics like lights, lock and a helmet at least, but you can always get more if you need them. There are many more decisions to be made when buying a new bicycle (what are the frames made of? how big the wheels should be?). Always think about how are you going to ride and you’ll know the answers.