It used to be the case that you had to open ports on your router to play some multiplayer games. I haven't had to do that in many years -- pretty much every game works online out of the box. What changed?
It helps to understand why you need/needed to open ports in the first place. Once upon a time, every computer on the internet had a unique IP address. However, with the rise of residential internet (and the decline in IPv4 address space), it became more and more popular to share an IP address amongst multiple devices via a scheme called network address translation (NAT).
NAT works fine for outbound connections, which accounts for most of the connections an average internet user makes. However, in order to act as a server, you have to decide which computer that is sharing a public IP will accept a connection on a given port. This process is called forwarding or opening ports.
Some PC games and many console games (your Halos and your Calls of Duty) still work on a peer-to-peer networking, where one player in the game is the host and must be able to accept the incoming connections from other players. Thus, someone needs to open ports on their router in order for the game to be played.
However, many PC games these days use centralized servers to establish connections between different users. This means that the players in the games only need to be able to establish outbound connections. This is no problem, even when NAT is involved, so there's no need to open ports.
There's also a protocol called universal plug and play or UPnP, which allows routers to automatically understand what ports need to be routed where by communicating with the devices that need the ports. This is gaining in popularity, but isn't supported by all routers and devices.
tl;dr: Games with dedicated servers don't require you to open ports, unless you're hosting the server yourself.