This toy must be the messiest on the market! (The instructions do warn the user about that, so I haven't just bought a faulty unit.) It uses the shape memory property of Nitinol wire. It's far from obvious how it works and the description in the instructions is not very convincing.
I'm not going to attempt a full description myself, mainly because I'm not sure I understand it fully. Basically, it uses the properties of Nitinol wire in the form of a spring that contracts and expands as it is heated and cools. It's supplied with two plastic containers, one to contain hot water and the other cold. The engine sits with one half in each.