Some of those are announced in advance while others are surprise drops that only stick around for a couple of days or so, and others still are ones that people can only play for free for a limited time, but not keep forever.
Every month, PlayStation, Steam, the Epic Games Store, and major gaming platforms give out a number of free games over the course of a few weeks.