Passengers can ask flight attendants to see if they can visit the cockpit of an airplane. Depending on individual company policy and the Permission of the Captain passengers may be able to enter before and after the flight. Access during the cruise portion of the flight is mostly forbidden.