Wired just put up an article about the Briggs-Rauscher oscillating chemical reaction. I did my Extended Essay at a UWC about this, it is quite a complicated reaction.
The Belousov-Zhabotinsky Reaction is a similar oscillating chemical reaction.
The trick to both of these is that the reaction isn't a perpetual motion machine, the law of conservation of energy is respected, what is happening is that a large scale reaction is proceeding, and there are some minor sub-reactions that have products that are different colours, these minor reactions have feedback loops to each other, and give the oscillating behaviour that is seen. Very neat.
I studied chaotic behaviour in these systems, when you heat them up, very interesting things happen, and the regular oscillations start to get ahead of themselves and the non-linear behaviour produces a chaotic system, like the well known "butterfly effect".