The game generally tries to find a multiplayer game that has a low latency. This differs from a game that is geographically close to you, but they are generally similar enough that you can assume they are the same.
Think of it this way - say there's a town North of where you live, and a town West of where you live that is twice as far away. Which one can you get to faster in your car? You'd probably assume the one to the North. However, if the roads going North all have low speed limits, and the roads going West are superhighways with no traffic, you'd actually probably make it to the town to your West faster than the one to your North.
The internet is similar - vast data pipelines interconnect regions, just like the roads do. The game is trying to figure out which game is the fastest round trip to you, not the geographically closest. However, you're much more likely to find something closer to you than something very far away.
The less people who are playing in your region, the harder this is, so at times when less people are playing (ie, if you were playing the original CoD now, which has very few players compared to MW3) the game must search harder and potentially travel further in order to find a suitable game.
CoD on consoles is played 'peer-to-peer' which means that there are no dedicated, central servers to play on. This also means that if there's no suitable game, you might end up in a lobby by yourself - this means the game created a new match in your area, and is waiting for other people to find it. In PC gaming, (and some console games) there's generally a list of dedicated servers you choose from when you start the game. If the server nearest you is full, tough luck, you'll have to find one further away.
Hope that explains the subtle differences :)