A roller coaster works by getting pulled up a little hill in the beginning by a train. Then it goes down by pure momentum, without gravity, roller coasters would not work. It is all based on gravity, a lot of math is also used. In the past, they were made by wood and were not as strong and were not as safe. They would have to be repaired a lot.
Now, we have roller coasters that metal now. They are much better now.
A video on how roller coasters work: [youtube]http://www.youtube.com/watch?v=7Tredv0Yq1M[/youtube]