I had an argument at school with one of my friends about this. I said that Cooper stays the same age because he is ages away from Earth, but my friend said that I'm wrong because he is in an Earth-like environment therefore he ages the same as he would on Earth - is this true?
You both seem to be misunderstanding the science behind Interstellar. The reason that Cooper stays the same age while his children continue to grow old is due to the theory of relativity, specifically time dilation and more specifically gravitational time dilation.
A brief overview of the idea is that in places where gravity is higher, time passes slower. As such, we can see in real life that clocks in orbit around the Earth will end up out of sync with clocks on Earth by very small amounts.
But when the difference in gravity is stronger, the effect is too. So when Cooper and his crew travel to a planet orbiting a supermassive black hole called Gargantua, the difference in gravity between Earth, the ship in outer space and the planet they travel to means that from their perspective very little time has passed, but the astronaut on the ship (and the people still on Earth) see about 23 years pass.
In short, the difference in how Cooper ages in Interstellar has (almost) nothing to do with his distance from Earth or the Earth like conditions he is living in - rather, we see the effects of gravitational time dilation in extreme circumstances.
You are slightly correct, but also wrong at the same time.
Why you're slightly right
As shown in this Physics.SE post, astronauts further away from the gravitational field of Earth (in the cited example, it is on-board the ISS) will actually experience time dilation, albeit extremely minutely: the time difference is roughly a 10-9 second change. Note that this means that it will take a hundred years for you to notice a 1 second difference between someone on-board ISS and someone on Earth.
Why you're wrong
That said, the reason Cooper appears to stay around 35 years old throughout the film is because1 of Gargantua, the super-massive black hole (SMBH), and the associated gravitational time dilation of this SMBH, as mentioned by Dr R Drizzle.
Gravitational time dilation is a phenomena encountered in general relativity
whereby time runs slower when in a higher gravitational potential. Put simply, the closer you are to a large body like the Earth the slower time runs, thus time runs slower for someone on the surface of the earth compared to someone in orbit around the earth."
(source, link added by me)
The strength gravitational potential inversely depends on the radial distance from the object, so by being in close proximity to the SMBH, the experienced time between Cooper & someone on Earth is necessarily different. The two big instances of this effect in the film are:
- The trip to the water world took about 3 hours in Coopers time, but for Romiliy on-board the orbiting ship, 23 years passed2.
- The sling-shot maneuver seemed to take a few minutes, but another 51 years was elapsed on Earth (cf. the 2:30 mark of the linked YouTube video and Dr Brand's subsequent comment, You don't sound so bad for someone pushing 120.).
Note that this was a big part of the point of the movie: Kip Thorne (scientific consultant & executive producer of the movie) wanted the populace to see black holes and relativity in a scientifically accurate way3. The effects of Cooper & Brand's trips are scientifically correct and even the footage of the SMBH came from a simulation of Einstein's field equations (that also produced two research publications).
There were also a fair number of questions asked on the Physics StackExchange site about the movie Interstellar. This simple site query should provide you with a starting point for some of the physics behind the film. Most relevant would be:
- How strong must gravity be to stretch time
- Is time dilation an illusion (not about the movie, but relevant nonetheless)
- Gravitational time dilation, does time of the observer at a lower gravitational potential looked slowed down in the frame of the higher one
1 Obviously ignoring the whole "it was filmed in ~1 year & Matthew McConaughey can't possibly have aged 120 years in that short time" reason
2 I am supposing Earth-based time, but I don't think this point is ever discussed in the film.
3 Cooper's fall into the SMBH notwithstanding here, the tidal forces would have torn his body apart.
Either I don't understand your arguments correctly or you both are wrong: It has nothing to do with the earth like environment or the distance to earth. The gravity of the black hole slows time if you are in its influence radius. This is why he only ages a bit while his children grow up and even get older than himself. They try to explain how it works in the movie, but to fully understand I would recommend to read some literature concerning Einsteins Relativity Theory on which the aging is based in the movie.