On an airliner, the pilot in command is called the captain. The captain, who generally sits on the left side of the cockpit, is ultimately responsible for everything that happens on the flight. Some of the responsibilities of the captain include making major command decisions during the flight, managing the cabin and crew team, taking lead during emergencies, and handling nuisance passengers.
All three pilots in the flight crew have equal levels of training, but they usually have varying degrees of seniority. At most airlines, the career track is based almost completely on length of service. To become a captain, you have to rise through the ranks and wait until it's your turn and a position opens up. Seniority also dictates the sorts of planes a pilot flies, as well their flight schedule.
Ultimately, the “main” pilot would be the Captain. This is because they have greater powers within the aircraft, before, during, and after the flight. They also have a lot more responsibility than the others in the cockpit, so they’re certainly the most senior pilots on board.