Think about riding your bike to the top of a hill, pedaling like mad, then taking your feet off the pedals and hurtling down the other side.
A rollercoaster works the same way. The coaster is only powered at the very beginning of the ride, when the train is pulled up the first hill.
When it goes over the top of the hill, the only thing that propels the train is the weight of the train itself, pulled downward by gravity. There are no cables that pull the train around the track.