The accident at the Parque de Atracciones in Madrid happened as one train that had just completed the loop failed to stop, hitting the back of another train that was about to leave the station, an emergency services spokesperson said.
Of the 33 people who were injured, 27 were taken to hospital for evaluation, an emergency services spokesperson said. The injuries were mainly bruising and shock, he added.
The rollercoaster, the Tren de la Mina or "Mine Train," reaches a height of 17.5 m and travels 450 metres through waterfalls at a maximum speed of 55 km/h, according to the theme park's website.
It is the first family rollercoaster in Spain to incorporate the use of virtual reality glasses, according to the website.
Police and park staff are investigating the cause of the accident.
The Parque de Atracciones, opened in 1969, is spread out over 20 ha in the Casa de Campo, the Spanish capital's largest park.