What kind of bike should I buy?
Usually people use their bikes for something specific like work commute, off-road, longer road trips etc. If you are thinking of buying new bike you should first have a idea what kind of usage it is for. And often it is clear but not always. Some might buy a bike just to have one in case you need it. Still you know what kind of terrain you will be using it on. For example if you have a lot of forest and sandy roads near your hose it might be a good idea to buy a mountain bike (MTB) or cyclocross bike. In a city you should consider buying a city bike or maybe even a road bike.
What kind of bike should I buy? – Tyre width
Narrow tires
One easy method in finding a good bike for your needs is to look at the tires. Narrow tires are excellent in smooth roads and you will gain good speed with little effort. That means that you can go fast to places but the roads must be good. The tires are very narrow in road bikes and that means less friction to road so it is easy to pedal but it does not feel good to ride long on gravel or other uneven surfaces because you can feel every hump in you hands and butt. That is caused by high pressure in the inner tube so it does not soften the ride as much as wider tires.
If you feel like narrow tires are the thing, you should consider road bike or city bike. Road bikes have very narrow tires and city bikes usually have a little wider ones. These wider tires are still narrow compared to MTB tires but they will soften the humps more than road bike tires.
Wide tires
The best solution on uneven roads and trails is to get a mountain bike. They have wide enough tires to soften the riding in rough terrain. The tire pressure is lower in these bikes so you don't feel every hump on the road. Even better – MTB usually has suspension that softens the ride even more. You can choose between hardtail and full suspension bikes depending on your main usage. Hardtail has the suspension unit in front and full suspension has it in back too.
If MTB does feel like little too much you have an option to get something between MTB and road bike. That is a cyclocross bike. Cyclocross has the looks of a road bike but a little wider tires so you can go for a little off-road as well. They do not have any suspension but the wider tires will soften the riding experience enough in bumpy roads.
You can read more about the tire sizes here.