Apart from in porn movies, sex scenes in almost all movies are simulated, the actors do not really have sex.
They sometimes wear flesh coloured underwear to cover themselves or have tape covering...
These people are usually just actors but it is hard to believe that they don't get any sexual stimulation out of the experience. However, the sexual scene is either in front of many people on a set...