To swat is to hit or bat at something. You might try to swat a fly with a rolled-up magazine and then watch your cat swat at it with her paws.
Someone who’s attacked by a swarm of wasps will swat at them as they run away, and a kid who’s annoyed at her sister might swat her, too. The smack itself is also called a swat. Experts suspect that swat is an alteration of the Middle English swap, “to strike,” which mimics the sound of a sharp blow.