According to the Lansing State Journal, ears become blocked (or pop) when the eustachian tubes become blocked and close. The build-up of pressure created during the rapid gain or loss of elevation during an aeroplane flight can cause this. As you gain elevation, the air pressure decreases, causing air to become caught in the inner ear. This uneven pressure pushes your eardrums out, causing pain just before your ears pop.
Swallowing activates the muscles that open the eustachian tube. According to the American Academy of Otolaryngology, swallowing hard might be enough to reopen the tube and unpop your ears. Mints and chewing gum create enough saliva to keep you swallowing if it becomes difficult. Yawning is also helpful. In addition, it is also a good idea to stay awake during your flight if your ears tend to pop. Because you can't swallow while you are sleeping, the pressure will keep building and your head will be very uncomfortable when you awake.
You can take a decongestant pill or nasal spray about an hour before your flight. Decongestants will shrink the nasal membranes and help the ears unpop with less of a struggle. It is important not to overuse nasal sprays and use them sparingly when flying, as overuse can cause more congestion in the long run.
Try it Yourself
If your ears are still blocked, take a deep breath and hold it. Pinch your nose between your fingers and try to push air out of your plugged nose, as if you were blowing it gently. Keep doing this until you hear the "pop" of your ears unplugging. All of these techniques can be used before, during and after your flight to relieve ear pressure. If your ears are still blocked, consider visiting a doctor, who can make a small incision to the eardrum to relieve the pressure manually.