A primary (also called a gravitational primary, primary body, or central body) is the main physical body of a gravitationally bound, multi-object system. This object constitutes most of that system's mass and will generally be located near the system's barycenter.
In the Solar System, the Sun is the primary for all objects that orbit the star. In the same way, the primary of all satellites (be they natural satellites (moons) or artificial ones) is the planet they orbit. The term primary is often used to avoid specifying whether the object near the barycenter is a planet, a star, or any other astronomical object. In this sense, the word primary is always used as a noun.
The center of mass is the average position of all the objects weighed by mass. The Sun is so massive that the Solar System's barycenter lies very near the Sun's center. However, the gas giants are far enough from the Sun that the Solar System's barycenter can be outside the Sun, despite the Sun comprising most of the Solar System's mass.
A disputed example of a system that may lack a primary is Pluto and its moon Charon. The barycenter of those two bodies is always outside Pluto's surface. This has led some astronomers to call the Pluto–Charon system a double or binary dwarf planet, rather than simply a dwarf planet (the primary) and its moon. In 2006, the International Astronomical Union briefly considered a formal definition of the term double planet that could have formally included Pluto and Charon, but this definition was not ratified.
The use of the noun primary to refer to an extrasolar planet is dubious. Astronomers have not yet detected any bodies (exomoons) that orbit an exoplanet. The use of primary to refer to the supermassive black hole at the center of most galaxies has not occurred in scientific journals.