Hi kwirky,
I assume you are referring to the Hydor brand rotating head for a powerhead (otherwise none of this will apply

)
Here are some pics
an exploded view
the guts
a view of the impeller
The flow from the powerhead turns the impeller.
The spiral ridge on the impeller shaft turns the cog wheel
The cog wheel interacts with a cog wheel around the rim of the rotating head
It cost $25 CAD.
I couldn't make something like it.
I have often thought that a simple pop up rotating sprinkler head would do the same thing if you could figure out how to stop it from clogging up.
Hope this helps.
________
ZB50