Cars provide us with a means of travelling great distances at great speeds with very little work. But you can't get something for nothing. Through a series of chemical reactions, cars turn the pumped fuel into energy to get you from point A to point B.
Gasoline consists mainly of medium-sized hydrocarbons, a fancy word for chains of carbon atoms linked together with hydrogen atoms around the outside. These molecules, with some oxygen thrown in, can reconfigure into carbon dioxide, carbon monoxide, and water (and some other by-products), but it takes heat to get them there (in other words, you have to burn it). In this configuration, they are more stable and have less internal chemical energy, so the transition from one to the other releases a lot of energy in the form of heat.
A car engine uses this reaction to push its pistons. Inside the piston chambers, the gas is sprayed into the air (to mix it with the air's oxygen) and then ignited. The reaction (basically a little explosion) heats it all up, making the air expand and push the piston outward. This is how the engine converts the gasoline's chemical energy into mechanical force.
All of the pistons connect to a rotating axle, timed so that when the reaction goes off and the hot air pushes them out, they push with the axle's rotation. This way, the force from the expanding gas is used to put torque on the axle so that it can drive the car forward.