How to meditate

The practice of anāpānasati varies. Typically, one begins by sitting in a comfortable position, with the back and neck straight, in a comfortable and peaceful environment.
The meditator should breathe naturally, without attempting to change the length or depth of the breath.{Majjhima Nikaya, Sutta No. 118, Section No. 2, translated from the Pali} If the breath is short, the meditator should simply observe that the breath is short. If the breath is long, the meditator should simply observe that the breath is long.
While inhaling and exhaling, the meditator practices:

Tutors will explain that, in an untrained mind, thoughts constantly arise, disturbing the focus. They arise and fall away, like waves in an ocean. If one disregards them, they slowly wither and disappear. On the other hand, if one pays them attention, one is soon lost in a web of thoughts.
In this tradition, there are two types of thoughts: thoughts from the past and thoughts about the future. These may bring happiness or sadness. It is said that, when left unattended, the mind will flit from one thought to another, wandering aimlessly.
Practitioners are tutored to avoid their practice being disrupted by passing thoughts and to nudge themselves into concentrating on their breathing once again.
A popular non-canonical method used today, loosely based on the Visuddhimagga, follows four stages:

focusing only on the spot where the breath enters and leaves the nostrils (i.e., the nostril and upper lip area).