When you are flying low level in a combat zone, the enemy tries to shoot you down using heat seeking missiles. To deter the missiles, pilots fire flares and this hopefully will attract the missile, enabling you to fight another day.
No they are anti missile flares, most fast jets and helicopters carry them. Those shoulder launched ground to air missiles are pretty good in the right hands, so the flares deter them.