The 1990 immigration law "capped" legal immigration at 700,000 persons a year. Yet since 1990, there've been only two years in which legal immigration has been below that level.
In 2006, 1,266,264 people were granted legal permanent resident status. That's a record if you exclude the post-IRCA amnesty spike of the early 1990s—which reflected the 1986 amnestying of illegal aliens  already here.
In contrast, the stock of illegals in the US is growing by an estimated 500,000/year. [The Size and Characteristics of the Unauthorized Migrant Population in the U.S., by Jeffrey S. Passel, Pew Hispanic Center, 2006. PDF ]
There are about 26 million legal immigrants in the country. Notoriously, the U.S. government doesn't know how many illegals are here . The official estimate is 12 million, but it could be as high as 20 million.  This is certainly a scandalous situation. But, either way, there are still more legal immigrants—and their numbers are growing faster.
Why doesn't the 1990 "cap" on legal immigration work? Because it exempts "immediate family" of U.S. citizens. Current immigration law allows both naturalized and U.S.–born citizens to bring in their spouses, children and parents without limit—a never-ending chain. Legal residents (i.e. Green Card holders), may have to wait  several years before bringing their families to America (legally). But of course, once they're here, they're here.
The "immediate family" loophole accounted for 580,483 immigrants in 2006, slightly less than half of all legal immigrants admitted that year. Over the past decade it has been the largest category of legal immigrant admissions. (See Table 1 .)
One way in which this can happen arises out of the current misinterpretation of the "citizen child" clause of the 14th Amendment. A child born to an illegal alien in the U.S.  is automatically a U.S. citizen—an "anchor baby."  In the present climate, this means the parents are hard to deport as a practical matter—and the child will be able to petition his parents into the U.S. legally when he reaches 18. (An estimated 300,000 "anchor babies" are born in California each year.)
Or an illegal alien can marry  a U.S. citizen.  (An Asian marriage ring was recently broken up by the ICE—one woman, Julie Tran, pled guilty to being involved in "as many as 75 sham marriages ," a scam  to get green cards for both local and overseas clients.)
Refugees are another category exempt from the worldwide limit. A refugee is defined as "an alien outside the United States who is unable or unwilling to return to his or her country of nationality because of persecution or a well founded  fear of persecution."
A sister category—asylee —refers to such people who have somehow already gotten into the U.S.
The refugee and asylee categories are just another form of expedited immigration. As Peter Brimelow  points out in Alien Nation  (Page 82), more than 80% of refugees have relatives already here—something that would be impossible if these individuals had truly been selected at random from disenfranchised peoples.
216,454 refugees and asylees were admitted in 2006.
The "diversity lottery" is another end-run around immigration laws.  It allows millions of people around the world to send in an electronic lottery number from which 50,000 winners are picked each year.
Since no ties to relatives in the U.S. are required, the program was supposed to allow a more geographically diverse group of people to obtain permanent resident status.
It hasn't worked. Most the winning lottery tickets are eventually disqualified because of fraud—many individuals sending in multiple entries under different aliases. And the winners are disproportionately from the Muslim world—with several implicated  in terrorism  in the United States.
And then there are legal "non-immigrants," a group that includes H-1Bs who are admitted because their (allegedly ) high-tech skills are (allegedly ) in short supply. H-1Bs are capped at 65,000. But a whopping 407,418 were actually admitted in 2006.
That's because the "cap" pertains only to persons working in the private sector. Universities and non-profits can apply for an unlimited number of H-1Bs—even though most of these "exempt" H-1bs eventually get green cards and become naturalized citizens.
Another guest worker program, the H-2B, admits persons who "perform services unavailable in the U.S." They're mainly seasonal workers in tourist areas and construction sites . This program is also "capped" at 66,000 per year. But—as with its H-1B cousin—the cap exempts students and individuals working for non-profits. 87,000 H-2Bs were admitted in 2004, the latest year of available data. 
And in case you're wondering, the anchor baby loophole applies to guest workers also. H-1Bs and H-2Bs are allowed to bring in spouses (and children). These are not counted towards the "cap." And, as with illegal aliens, a baby born here  means they are hard to deport and can ultimately be sponsored in by their citizen child.
But legal immigration is larger, growing faster, potentially more disruptive—and, because it is set by inflexible statute, just as much out of control.