Modern roller coasters often utilize a wheel design that works with a tube track. The wheels of a coaster are actually three or more wheels in an assembly. The entire assembly grips around the track, instead of just riding on the top. This allows the track to actually hold the car, instead of the car just riding on top. Because the wheels grip the track, the loops and twists are possible since the cars will not come off .
Early coasters in the 1800's were made out of wood. Modern roller coasters, however, use high-strength steel for all the girders and support elements. Unlike the roller coasters of the past, steel is far stronger than wood, and able to withstand the high forces involved when a car passes over the tracks.
In the days before computer-aided design, all roller coasters were created on a drafting table with pencil and paper. Complex curves and loops were very difficult to draw. In modern times, engineers use complex drawing software instead. If any flaws are detected, they can easily modify a section to eliminate the defects. You can even obtain a free program so you can design a coaster on your own.
The key word in "Roller Coaster" is the word "coaster." A roller coaster is gravity powered, since the cars coast. Engineers understand and utilize the physics behind this movement. Notice that all roller coasters have a very large hill first. The cars roll down from the top of the hill, and all the stored kinetic energy is used to push the cars through the rest of the track, including through its loops.