Direct current electricity is what solar cells produce - a flow of electrons in one direction. Changing the direction of the flow of electrons will reverse a direct current motor's spin.
This can be an interesting thing when you connect two solar panels to the same motor, but with their leads reversed. The solar panel receiving the most sunlight will be the one that dominates, and the motor will spin in the direction the more sun-lit panel is wired for.
If you place a perpendicular card between the two solar
panels, with both panels attached to the motor, but with their postive and negative
leads reversed, when both receive equal sunlight (pointed directly at the sun)
the motor will be still. If one panel is shaded, the motor will run in the direction
set by the panel receiving the most sunlight. If that motor is attached to a
wheel, and the whole assembly mounted on a turntable, the panels will track
the sun all day long. For an example of this see Mark Mateus' Solar Home.