The principle of a hot-air engine is similar to that of a steam engine - heat is used to expand a gas, and the expansion and/or contraction is then used to do work, typically by driving a piston that can then be coupled to a driveshaft. Because there will often be parts of the driving cycle where the shaft is liable to "get stuck" at the top or bottom of the cycle, multiple pistons with different phases can be used to drive the same shaft, so that there will always at least one part of the mechanism powering the driveshaft, or a flywheel can be used to smooth out the engine's propulsive "kicks", and keep the shaft turning while the mechanism returns to its drive-state. Often both methods are used.
Where a steam engine differs from a hot-air engine is in exploiting a more severe degree of expansion and contraction that happens when a gas is near its condensation temperature, and transforming between a rarefied gas and a much denser liquid, and steam engines are often useful for more "brute force"-type applications, such as forcing the drivewheels of a large steam locomotive.
However, steam engines often need more careful attention while they are running, to keep them operating within their optimal range. Hot-air engines are often more tolerant of neglect, and some designs have a reputation for being able to be left running unattended for hours.