Motorised bicycles are a fun and efficient way to get around, and are a far more palatable option than walking everywhere. By any legal definition, a motorised bicycle is considered a moped and is subject to the laws that pertain to vehicles that originally fit the description.
The first things you need to be aware of when building a motorised bike are the applicable laws in your state. No state forbids motorised bikes outright, but laws vary from place to place as far as allowable top speed, engine displacement and drivetrains. The letter of the law will determine how you build your bike. Almost all states allow bikes to have gas engines of no more than 49cc in displacement that are rated at no more than 2 horsepower. Top speed in most states is 30mph on engine power alone, and a motorised bike cannot be operated on a sidewalk with the engine running.
Most commercially available engine kits are designed to fit cruiser-style frames, similar to those that were popular in the 1950s. This is the route you're going to want to go for ease of installation, but better options are available for increased safetey, speed and ease of use.
The biggest problem with motorising any bike is that the frame was not designed for the speeds of which they are capable, and nonsuspended cruiser-style bikes ride very rough when ridden at anything near 30mph. The better option is a "hybrid" mountain bike such as those available at Wal-Mart and Sports Authority. These types use a mountain-bike frame and front suspension for a safer and more comfortable ride but lack a rear suspension that would make engine installation impossible. These bikes also have tougher frames, wheels and bearings, which are better suited to high-speed use.
Gasoline-engine kits are available online in either 2-stroke ($90-$150) or 4-stroke ($180-$400) designs from a number of online sources, including eBay and Zipp. A 2-stroke engine is lighter and offers more top-end horsepower but lacks the low-end torque produced by larger and more expensive 4-stroke engines. 2-stroke kits come complete with engine, drive chain, throttle and a universal drive sprocket that attaches to the rear wheel. Installation procedures will vary by kit, but American-made engine kits tend to come with better and more comprehensive instructions.
One option to seriously consider is a steering stabiliser, which reduces high-speed steering wobble. Steering wobble is the number one cause of high-speed accidents on motorised bicycles, so a £19 stabiliser originally designed for a pocket bike is cheap insurance.
If you're determined to ride your bike on sidewalks, consider an electric motor in addition to the gas engine. Although this will effectively double or triple the price of your bike, you can ride on sidewalks under electric power without getting fined. Consult your state laws for legality and hybrid bike loopholes (of which there are sure to be many).