Sex in the movies?

I watched a film the other night (regular thriller) and i am wondering if someone knows the real answer to this... when a couple are having sex in a movie (not porn) supposedly and both are totally butt naked and clearly very close, how do they do it without actually doing it. is there some way they stop themselves from really going at it or is there something between them.
Answer
If they are not actually doing it then the penis gets positioned in a set place and as they take shots then clip them together you will never know, however it was brought to my attention in a recent interview i watched that a lot of stars are actually not faking the sex scenes they are in fact real.