A primary (or gravitational primary, primary body or central body) is the main physical body of a gravitationally bound, multi-object system. This body contributes most of the mass of that system and will generally be located near its center of mass.
In the solar system, the Sun is the primary for all objects that orbit around it. In the same way, the primary of all satellites (be they natural satellites (moons) or artificial satellites) is the planet they orbit. The word primary is often used to avoid specifying whether the object near the center of mass is a planet, a star or any other astronomical object. In this sense, 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 center of mass is very close to the center of the Sun. However, the gas giants are far enough from the sun that the center of mass of the solar system can be outside the Sun, despite the Sun having most of the mass of the solar system.
An interesting example of what can be called a primary is Pluto and its moon, Charon. The center of mass (or barycenter) of those two bodies is always outside Pluto's surface. This has led some astronomers to call the Pluto-Charon system a binary dwarf planet or a double 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.
Beyond the solar system, the use of the noun primary, in reference to an exoplanet, is dubious. Astronomers have not yet detected any bodies that orbit an exoplanet. The use of primary to refer to the supermassive black holes in the center of most galaxies has not occurred in scientific journals.