Assuming it's not just using body doubles which is the easiest way, usually you film the same actor twice with the camera left in place and then splice the two films together either by physically cutting and pasting the film or more recently with software. The software also has the advantage that it can blend things better, and fix lighting differences, and differences in film exposure which isn't as big of an issue now with film quality being more consistent. Often in older films you can often see an obvious difference between the two shots.
There's also some films where they take a much easier approach where they film one scene and then use a green screen for the second take. This allows for doing the takes at different times since the camera might get moved or other small changes that are difficult to work around in a single day and allows for multiple camera angles to be used more easily, but it can be difficult to get the aspect ratios and depth just right, so it often looks less natural if the first take has the character along the same or too similar of a plane of depth as the second.