Aim the camera at the set where you want to see the ghost. When you are happy with the frame, lock the camera in place. It must not move during the shot.
Set a large pane of glass in front of the camera, positioned sideways at a 45-degree angle. You will see a reflection of whatever is to the side of the camera in the glass, and see the set through it.
Lock the glass in place with C-stands or whatever else you have available. It also must not move.
Drape black fabric over the walls to the side of the camera to eliminate the reflection in the glass.
Darken the area around the black fabric to eliminate any remaining reflection.
Aim a light on a dimmer at the fabric area. You will have to aim either up or down to ensure that you do not light the fabric.
Shoot the scene through the glass, with the actor playing the ghost standing in the darkened area. When the ghost is to appear, turn up the light pointed at him. His translucent reflection will appear on the glass and be filmed at the same time as the actors on the set.