Opposition is a term used in positional astronomy and astrology to indicate when one celestial body is on the opposite side of the sky when viewed from a particular place (usually the Earth). In particular, two planets are in opposition to each other when their ecliptic longitudes differ by 180°.
A planet (or asteroid or comet) is said to be "in opposition" when it is in opposition to the Sun as seen from the Earth. This is the best time to observe a planet because:
Opposition occurs only in superior planets.
The Moon, which orbits the Earth rather than the Sun, is in opposition to the Sun at full moon. When it is exact in opposition, a lunar eclipse occurs.
As seen from a planet that is superior, if an inferior planet is on the opposite side of the Sun, it is in superior conjunction with the Sun. An inferior conjunction occurs when the two planets lie in a line on the same side of the Sun. In an inferior conjunction, the superior planet is "in opposition" to the Sun as seen from the inferior planet.