A transit occurs when one celestial body passes across the face of another, as when the inferior planets (those whose orbits lie within that of the Earth‘s, i.e. Mercury or Venus) pass in front of the Sun‘s disc.
Transits between other bodies would also be observable from different points in space.
If the majority or all of the background object is obscured by the foreground object, this is instead referred to as an occultation.
N.B in astronomy the term transit can also refer to the a celestial object crossing a meridian, or the movement of an object across the viewfinder of a telescope.