Based on your description, it sounds like your cat is swatting in a playful fashion. This type of game is a form of natural stalking behavior, and it can be great fun for cats if it elicits a response from the person who is attacked. It is a normal behavior, but it can be a problem if your cat injures your guests or if he creates socially awkward situations.
If your cat is young, he may outgrow this activity. Meanwhile, you can warn your guests about the game he likes to play. If your guests are comfortable with the situation, ask them not to react when the cat swats. If he is ignored whenever he engages in the activity, your cat may stop stalking your guests.
If your guests aren’t OK with this role, or if there is any chance that your cat will hurt them, then the cat should be isolated in a comfortable room when you have guests over.
For safety, you should trim your cat’s nails regularly.
Finally, if your cat has a history of injuring people while playing this game, you may want to talk to a veterinary behaviorist about the problem.