A chain hauls the train to the top of the first, highest hill. From the moment of the initial plunge, gravity is responsible for moving the train. At the top of the hill, the train has potential energy (think of potential energy as energy about to happen, e.g. a coiled spring).