In an internal combustion engine, the piston is the component that actually harnesses and directs the explosive force of the fuel vapor detonation.

When the fuel/air mixture] lights, it explodes, expanding and pushing the piston down. The piston is connected to the crankshaft, so the shaft spins. All you have to do is hook the shaft to a transmission, and voila, you have useful movement.

The face of the piston gets coated with carbon (a by-product of combustion) very quickly, which isn't a problem unless it gets really thick, which won't happen unless the fuel-air mixture is really wrong, or oil seeps into the combustion chamber.

On the side of the piston, there are two or three rings, which seal the top end from the bottom end. See, there's lots of oil flying around to lubricate the various moving parts, and it's important (in the case of a four-stroke engine) that it not leak into the combustion chamber. The rings seal oil against this. Similarly, it would be bad for fuel to leak into the crankcase, and the rings also guard against this.