A prime meridian is the meridian (a line of longitude) in a geographic coordinate system at which longitude is defined to be 0°. Together, a prime meridian and its anti-meridian (the 180th meridian in a 360°-system) form a great circle. This great circle divides a spheroid into two hemispheres. If one uses directions of East and West from a defined prime meridian, then they can be called the Eastern Hemisphere and the Western Hemisphere. For Earth's prime meridian, various conventions have been used or advocated in different regions throughout history. The Earth's current international standard prime meridian is the IERS Reference Meridian. It is derived, but differs slightly, from the Greenwich Meridian, the previous international standard.
A prime meridian for a body not tidally locked (or at least not synchronous) is entirely arbitrary, unlike an equator, which is determined by the axis of rotation. However, for celestial objects that are tidally locked (more specifically, synchronous), their prime meridians are determined by the face always inward of the orbit (a planet facing its star, or a moon facing its planet), just as equators are determined by rotation.
Longitudes for the Earth and Moon are measured from their prime meridian at 0° to 180° east and to 180° west. For all other Solar System bodies, longitude is measured from 0° (their prime meridian) to 360°. West longitudes are used if the rotation of the body is prograde (or 'direct'), meaning that its direction of rotation is the same as that of its orbit. East longitudes are used if the rotation is retrograde.