Note: Most players don't consider the expansions, Opposing Force and Blue Shift, canon. That is, they don't actually fit into the story, since they were developed by Gearbox.That part out of the way..
Story in a nutshell:
No player has a confirmed amount of time between Half-Life, and Half-Life 2, however, it is suggested that it has been 20 years by an old Episode One site. In the actual game, Episode One, Dr.Kleiner offers another hint at how long it has been, but it is far more vague, suggesting a decade or decades, I can't find a transcript of Kleiner's breencast at the moment. As to how exactly the Combine come into play, it's a retcon on the original story, although it may have been laid out from the beginning, I'm not sure, but, apparently the Vortigaunts (the aliens you were just fighting 2 seconds ago) and their "master" the Nihilanth (the giant floating brain baby alien thing) were being chased by the Combine. They managed to escape to Xen, the place Black Mesa managed to get into and had been in for some time conducting research it would appear.
Anyway, whenever the Resonance Cascade happened, which was actually *spoilercausedbythegmanspoiler*, it became easier for the Nihilanth to rip through into Earth's dimension, which it took advantage of as another escape route. You see, the Nihilanth and the Vortigaunts were stuck against a wall in Xen, they could find nowhere else to run, so the Resonance Cascade finally opened up another path to get further away from the Combine. It wasn't in the Nihilanth's plans to rule Earth or to cause such a panic, as it was as uncertain as the humans who first entered Xen whenever it came to what to expect. It did what anyone would do if it could, whenever it comes to exploring unknown territory, it sent military troops in, so that in the event any inhabitants were hostile, they'd be able to react in kind.
Unfortunately, this led to your attempts to halt them, and to the Nihilanth itself, and to killing it. Which, while good for the Vortigaunts, and supposedly to you as a player and humanity in general, it was the complete opposite. It would seem the Nihilanth's death released its control on the gateways to Xen, or released a large amount of energy, the latter attracting the Combine's attention, the former just letting them gain access to Xen, which then led to the Combine's access to Earth. Whatever the case, they were drawn to Earth after the Nihilanth's death, and, being a military superpower, quickly overwhelmed Earth's armies, albeit I'd say with the inadvertent help of the Portal Storms caused by the portals they opened up to gain access to Earth in the first place.
Interestingly though, after the events of Half-Life 2, it would appear you weren't even meant to proceed, at least at that time. The G-Man was keeping you in holding again, much like at the end of Half-Life, and the only reason you did even proceed was due to the Vortigaunts' interference. Hope that helps your understanding of it a bit.