Let's begin with basic definitions for rotation and revolution.
Rotation is the spinning of an object on its axis. Examples: basketball spinning on a finger, Earth turning along its North/South axis.
Revolution is the movement of an object around another object.
So, Earth revolves around the Sun, and the Moon revolves around Earth. At the same time, Earth and the Moon are also rotating. Earth's rate of revolution is about 365 days (one year), and its rate of rotation is about 24 hours (one day).
The reason why objects in the universe rotate and revolve have to do with gravity and angular momentum. They can be understood best in the context of the origins and evolution of our solar system.
Our solar system began as a nebula, a cloud of gas and dust. About 4.6 billion years ago, it began to contract (or get smaller). The exact causes for this are unknown. As it contracted, it began to rotate, flattening into a disk. As an example, imagine an ice skater spinning and pulling in her arms--as she pulls in her arms, she spins faster and faster. This demonstrates the conservation of angular momentum. Thus, as the nebula contracted, matter moved towards the center of the nebula, eventually creating the Sun. The planets formed from clumps of matter that got bigger and bigger (due to gravity, an attractive force), until all the matter had been "swept up". This is why all the planets revolve, or move around the Sun, in the same direction. If we were to look at the solar system from above Earth's north pole, the planets would revolve clockwise around the Sun. In the same manner, all the planets and the Sun generally rotate in the same direction (eastward). Venus and Uranus are two planets that have retrograde rotation--they rotate in the opposite direction, possibly due to cataclysmic events in their pasts.
To summarize: Rotation and revolution occur in the universe because of forces like gravity and angular momentum.