First of all, most airports do not close.
Second of all, there are multiple security measures in place that keep people from sneaking onto the tarmac or past security.
If you did manage to sneak onto a plane, you would most likely be found as the flight attendants do pre-flight checks.
If you did manage to get by and the plane took off, you would most likely be found out anyhow as flight attendants are aware of how many people are on the plane, what seats are empty, etc.
When you were found out, they would either divert to the nearest airport and have you removed from the plane at that time (by authorities) or have authorities waiting to meet you when the plane arrives at its scheduled destination.
You would then face a multitude of criminal charges.