Flares have to be unlocked first. Once you have them, equip them at the deployment screen, then press R1 on a controller while flying a jet or helicopter to deploy them.
Earning the unlock quickly is mostly about assisted points. Find a competent pilot, take the gunner seat, and pick up a few kills yourself — the pilot will typically be carrying heat-seekers and flares, and the assists accumulate fast. One player reported unlocking both in a single match that way.
Flares are on a cooldown, so save them for the moment a missile is actually inbound rather than popping them preemptively.