What happens when a plane declares an emergency?

Like, they can't exactly stage a rescue mission like they can with boats and ships. I know like they might reserve a runway for it to land, but what if the elevator thing got stuck so the plane just kept rising? Is there some kind of a protocol to try and get the plane down?
10 answers 10