The pilot in command (PIC) of an aircraft is the person aboard the aircraft who is ultimately responsible for its operation and safety during flight. This would be the "captain" in a typical two- or three-pilot aircrew, or "pilot" if there is only one certified and qualified pilot at the controls of an aircraft. The PIC must be legally certified (or otherwise authorized) to operate the aircraft for the specific flight and flight conditions, but need not be actually manipulating the controls at any given moment. The PIC is the person legally in charge of the aircraft and its flight safety and operation, and would normally be the primary person liable for an infraction of any flight rule.
The strict legal definition of PIC may vary slightly from country to country. The International Civil Aviation Organization, a United Nations agency, definition is: "The pilot responsible for the operation and safety of the aircraft during flight time." Flight time for airplanes is defined by the U.S. FAA as "Pilot time that commences when an aircraft moves under its own power for the purpose of flight and ends when the aircraft comes to rest after landing." This would normally include taxiing, which involves the ground operation to and from the runway, as long as the taxiing is carried out with the intention of flying the aircraft.
...the person who: (1) Has final authority and responsibility for the operation and safety of the flight; (2) has been designated as pilot in command before or during the flight; and (3) holds the appropriate category, class, and type rating, if appropriate, for the conduct of the flight.
U.S. FAA and ICAO pilot in command regulations 
Serving as pilot in command 
- (a) The pilot in command of an aircraft is directly responsible for, and is the final authority as to, the operation of that aircraft.
- (b) In an in-flight emergency requiring immediate action, the pilot in command may deviate from any rule of this part to the extent required to meet that emergency.
- (c) Each pilot in command who deviates from a rule under paragraph (b) of this section shall, upon the request of the Administrator, send a written report of that deviation to the Administrator.
The pilot-in-command of an aircraft shall, whether manipulating the controls or not, be responsible for the operation of the aircraft in accordance with the rules of the air, except that the pilot-in-command may depart from these rules in circumstances that render such departure absolutely necessary in the interests of safety.
In Annex 2, par. "2.4 Authority of pilot-in-command of an aircraft", ICAO adds:
The pilot-in-command of an aircraft shall have final authority as to the disposition of the aircraft while in command.
Both FAR 91.3(b) and ICAO Annex 2, par. 2.3.1, specifically empower the PIC to override any other regulation in an emergency, and to take the safest course of action at his/her sole discretion. This provision mirrors the authority given to the captains of ships at sea, with similar justifications. It essentially gives the PIC the final authority in any situation involving the safety of a flight, irrespective of any other law or regulation.
Logging pilot in command time 
Under U.S. FAA FAR 14 CFR 61.51, logging flight time as a PIC is different and distinct from acting as the legal PIC for a flight. This article is focused on the identity and legal responsibilities of the pilot acting as PIC for a flight, not the logging of PIC flight time, which is done to record flight experience. In general, the PIC of a given flight may always log his or her flying time as such, while other crew members may or may not be authorized to log their time on that flight as PIC time, depending on the specific circumstances and the controlling jurisdiction.
- ICAO Annex 2 – "Rules of the Air"
- "Part 1 DEFINITIONS AND ABBREVIATIONS" (HTML). October 12, 2012. Retrieved 03-15-13.
- "CFR Title 14 Part 1 Section 1.1". U.S. Federal Government. Retrieved 06-12-2010.
- "U.S. FAA FAR 91.3: Responsibility and authority of the pilot in command". Retrieved 2006-10-20.
- "Title 14: Aeronautics and Space: §61.51: CERTIFICATION: PILOTS, FLIGHT INSTRUCTORS, AND GROUND INSTRUCTORS – Pilot logbooks". Code of Federal Regulations. United States Federal Aviation Administration.
- Fried, Howard (1997). Beyond The Checkride. McGraw-Hill. pp. 101–111. ISBN 0-07-022468-4.