The primary hull, also known as the main section, saucer section or saucer module on some classes, was a major component of the overall hull structure of most Federation starships. The primary hull was generally located above and to the front of the secondary hull. (TOS: "The Apple")
On many Federation starships, including the Constitution-, Excelsior-, Miranda-, Nebula-, Akira-, Ambassador- and Galaxy-classes, the primary hull was usually referred to as the saucer section, because it had a roughly circular shape while the Intrepid-class starship has a diamond shaped primary hull saucer section and a Sovereign- class starship has an oval shaped primary hull saucer section, the Defiant-, Nova- and Prometheus- class starships had a triangle or a U-shaped primary hull saucer section and the Daedalus- and Olympic- class starships had a sphere shaped primary hull. (TNG: "Encounter at Farpoint")
The primary hull typically contained most vital systems on board a starship, including the main bridge, computer core, captain's ready room, conference room, sickbay, science labs, Captain's quarters, crew quarters, transporter room, ten forward, mess hall, holodeck, corridor and other crew support systems. It does not generally house the warp drive or any major engineering systems, although in many cases it does contain its own impulse drive.
Ships capable of saucer separation were designed for this purpose in order to have the primary hull serve as a lifeboat for the crew in the event of catastrophic damage to the warp core or a loss of antimatter containment. It is for this reason the majority of crew comforts are nestled into the primary hull.
The Galaxy class saucer section was also intended to act as a temporary means of escape for nonessential and civilian crewmembers while the secondary hull dealt with a dangerous situation. It can operate independently of the secondary hull and reconnect with its drive section after the resolution of a crisis. For this reason, it contains duplicates of many systems in the stardrive section, including a large shuttlebay/cargo bay complex, a torpedo launcher in the docking cavity for rear defense, and deflector array. (TNG: "Encounter at Farpoint")
Saucer sections on some starships, like the Galaxy-class, are even equipped to make planetfall and landing, although not all are designed to return to space following a landing. (VOY: "The 37's"; Star Trek Generations)