compartment where the pilot sits while flying the aircraft
"The flight attendant gently guided me back to my seat after I accidentally wandered into the cockpit thinking it was part of the cabin."
a pit for cockfights
"The local fairgrounds were transformed into a makeshift cockpit where roosters fought in the dirt arena."
seat where the driver sits while driving a racing car
"The mechanic climbed into the cockpit to adjust the steering wheel before the race began."
The driver's compartment in a racing car (or, by extension, in a sports car or other automobile).
"The mechanic climbed into the cockpit to check the engine before the race started."