Pinch or cut the flower off of the plant at the intersection of the flower and the stem. Pinching is done between the thumbnail and forefinger. The flowers may be cut using sharp scissors or shears.
After a plant flowers it goes to seed, from which the next generation of the plant arises. Deadheading before the plant goes to seed forces it to produce more flowers in order to produce seed.
Edible herbs are at their sweetest or most potent flavor just before it flowers. Deadheading herbs as they produce flowers prevents them from turning bitter.