Whales and dolphins are mammals, so in a lot of ways, they are just like human beings. Among other things, they have similar bone structure, are warm-blooded and give birth to "live young." The biggest differences between these animals and human beings are related to our respective environments. Whales and dolphins have a unique respiratory system that lets them spend long periods of time (sometimes 30 minutes or longer) underwater, without taking in any oxygen.
On land, human beings and other mammals breathe involuntarily: If we don't make a decision to breathe or not to breathe, our body will take in air automatically. Because of their undersea environment, whales and dolphins must be conscious breathers: They have to actively decide when to breathe. Consequently, in order to breathe, they have to be conscious. This presents a problem, since mammalian brains need to enter an unconscious state from time to time in order to function correctly (see How Sleep Works to find out why this might be).
There's plenty of time for a dolphin to catch a catnap between trips to the ocean surface, of course, but this isn't a viable option. When you're a conscious breather, it's just not feasible to be completely unconscious -- what if you don't wake up in time? The solution for whales and dolphins is to let one half of the brain sleep at a time. In this way, the animal is never completely unconscious, but it still gets the rest it needs.
Scientists have studied this phenomenon in dolphins, using electroencephalography. In this process, electrodes hooked up to the head measure electricity levels in the brain. The resulting electroencephalograms (EEGs) of dolphin brains demonstrate that in the sleep cycle, half of the dolphin's brain does indeed "shut down" while the other half is still active. Researchers have observed that dolphins are in this state for approximately eight hours a day.
We can't really know what this rest state feels like, but we can make a good guess. It is probably something like the semi-conscious state we experience as we begin to fall asleep. We're pretty close to unconsciousness, but are aware enough of our surroundings to wake up completely if we need to.
And where do dolphins and whales sleep? They could probably sleep anywhere, but it makes sense that they would do it near the surface of the ocean so they can come up for air easily. It's not uncommon to see dolphins "logging," swimming slowly along the surface, with very little movement. Presumably, these are dolphins at rest.