Palaeolithic hand axes were one of the first tools used by mankind. Simple modern mechanisms would be rope pulleys or levers. The internal combustion engine is a machine for turning oil into motion. A complicated example would be computers and the web.
The term is used by extension as a metaphor. Thus the celestial mechanics of Kepler and Newton is a way of predicting and explaining planetary motions in the Solar System. Darwin's natural selection is his proposed mechanism as to how evolution took place.