A Stirling engine is a heat engine that works by compressing and expending air and other gases in regularly cycle. The way a Stirling engine works is comparable to that of a car but the difference is that it has the potential to be much more efficient in using gasoline and the risk of a boiler explosion is existent. The process is mostly use where we need the engine operating to be as silent as possible (For example in a submarine). Because the engine can run using heat, it is suitable for alternative fuels engines, solar power, and other source of energy.
The engine is composed of two-cylinder where one is kept hot and the other is kept cool. The gas (air or any other type of gas) in the hot cylinder is heated which cause it to expand and move the pistons of the engine (Expansion). As the pistons moved, it creates a gap on the other end which is filled by the gas expansion (transfer). The gas then is being cooled in the second cylinder causing it to compress and occupy less room, making the pistons move back to their original position (compression). As the process is repeated, we have a working engine that can perform the desire work.
here is a video explaining the process:
http://auto.howstuffworks.com/stirling-engine.htm
http://www.animatedengines.com/vstirling.html
http://www.explainthatstuff.com/how-stirling-engines-work.html