Captain or pilot-in-command is the highest rank a pilot can earn. A captain has over 3,000 flight hours and is responsible for the entire aircraft and all occupants aboard.
An aircraft must always have a nominated senior pilot who is in overall charge of the aircraft, this pilot is the Captain. A newly-qualified airline or private jet pilot is allocated the rank of First Officer then later can become a Senior First Officer, before they take a Command Course.
Women pilots were also formerly called aviatrices (singular aviatrix). Women have been flying powered aircraft since 1908; prior to 1970, however, most were restricted to working privately or in support roles in the aviation industry. Aviation also allowed women to travel alone on unprecedented journeys.
This goes back to the old faithful of using sir and ma'am when addressing someone. If the pilot is male, saying thank you, sir is perfectly acceptable. Conversely, if they're a female, then a nice thank you, ma'am is commonplace.