You seem to be starting from a very low level of knowledge (no offense; we've all been there), and that makes it hard to give information. Normally I don't tell people to go to a bike shop unless they plan to buy there, but that might be a good step for you: Tell them what you plan to do, admit you're a novice, then listen to what they say. If you take up their time this way, though, you need to buy some of your stuff there--tubes, patch kits, helmet, whatever. It's only fair. You'll need some accessories, and by the time you pay shipping, mail order costs nearly as much as many shops.
I'm about your height, and that's a problem especially in used bikes: There just aren't that many around that fit guys our size. In a road bike, look for something about 64cm. 62 may work (it doesn't for me, but people vary). 60 will be too small. DO NOT buy a bike that doesn't fit. You'll spend a lot of time and energy trying to make it work, and you'll never be comfortable. I'm not as familiar with mountain bike sizes these days, but my 22-inch Cannondale (biggest they made when I bought it) is quite a bit too small for me.
Google "bike fit" or something similar for details on how to see if you're moving in the right direction. But 10 or 15 minutes in a good shop will teach you a lot about the advantages and disadvantages of the different types of bikes.
Had a Surly Cross Check - was totaled in recent accident. Sadly now just a Fuji Crosstown as a backup bike.
Find a local bike store, get fitted, try out bikes, ask questions, and answer their questions honestly. Don't expect to pay 99.95 for a bike. Road bikes seem to cost more. Hybrids may be nice for you (flat bars). Of course if you want to ride off road you have mountain bikes. You have to answer that. From my experience I stay away from 'comfort' bikes. Springs and softness will make you sore when you start doing more and more miles. Fuji and Marin make nice reasonable bikes for beginners. I'm sure there are others - these are 2 I'm familiar with.