While you can certainly install and run Call of Duty 4 on a Windows 7 PC, its official online multiplayer is no longer playable. The original servers were shut down as of January 1, 2011, so the standard matchmaking is gone.
If you're mainly after the single-player campaign, that still works fine. For online play today, you'd need to look into community-run or fan-hosted alternatives, since the official Infinity Ward servers are long gone.