The pilot in command is a person legally responsible for the operation of an aircraft while it moves under its own power, including both taxiing on the runway and flight. On small aircraft, there may only be one qualified pilot present, in which case he is the pilot in command. On larger planes where multiple pilots are part of the flight crew, one of them is designated as the pilot in command, and she is known as the captain. If something happens while the aircraft is underway, this person will have the legal liability if pilot error was at fault.
When acting as the pilot in command, the pilot does not necessarily have to personally control the aircraft. Other pilots may fly the plane or take turns on long haul flights, with the pilot in command supervising, making decisions about safety issues, and coordinating with the flight crew to make sure the flight runs smoothly and safely. The captain may take over in an emergency situation to personally supervise the response.
Single pilots handling small planes have control of their aircraft at all times, and must also communicate with flight crew, if present, interact with air traffic control towers, and so forth. On a large aircraft where the flight crew contains multiple pilots who work in shifts, the captain sets a schedule and makes sure everyone understands their duties, the flight plan, and any special instructions, depending on the aircraft and the purpose of the flight.
As the person in charge, the pilot in command must supervise health and safety for everyone on board the aircraft. With cargo planes, this individual is responsible for making sure the cargo reaches its destination safely, working with the ground crews to load it appropriately, stow it securely, and identify any special handling needs. When situations arise, the pilot in command works to resolve them and files a report on the ground discussing the situation and how the crew responded.
In the wake of an accident, investigators will determine the cause. This includes interviewing the flight crew to learn more about the conditions on the flight. The pilot in command is an especially important interview subject. If the investigators determine pilot error is the fault, she can face civil and criminal penalties, depending on the nature of the situation. It is possible to lose a pilot's license in the case of egregious health and safety violations.