The answer to this depends entirely on the Call of Duty you want to play. In general, the main series of games will cost something, and they remain relatively expensive even after they've been out for a decade. In some cases, the latest games will have free weekends where anyone can test out the game. This is certainly a free way to play, but it's only temporary. But don't worry, there are a couple of free methods.
First and foremost is Warzone, which is the most popular aspect of the current state of the franchise. Warzone is a Battle Royale that combines all of the weaponry of the last three entries in the series. Battle Passes and cosmetics will require payment, but they are not mandatory to play.
COD Mobile is another free version of Call of Duty that anyone can play. This game functions much like the latest games, and it combines content from plenty of previous releases. However, if you want to jump into the upcoming Modern Warfare II, you'll need to pay full price. The good news is that this game will be the main Call of Duty series entry for the next two years.