If you are a U.S. citizen, you can apply for green cards (lawful permanent residence) for your parents as long as you are at least 21 years old. Parents are considered to be "immediate relatives" under U.S. immigration laws, meaning there is no limit on the number of green cards given out in this category every year, and therefore no waiting list to slow down the application process.
One important consideration, however, is that you'll need to show sufficient income or assets to support, or sponsor, your parents at 125% of the U.S. poverty guidelines (as well as supporting your own family). This is intended to make sure they aren't inadmissible as likely "public charges," or people likely to receive need-based government assistance. To see the current poverty guidelines levels, see Form I-864P.
In addition, it's important to realize that your parents can be denied green cards if they are inadmissible on other grounds, such as having a record of criminal convictions or immigration violations, or carrying a disease that presents a public health risk, or having a dangerous physical or mental disorder.
To start the process, you'll need to fill out Form I-130, also called Petition for Alien Relative, issued by U.S. Citizenship and Immigration Services (USCIS). The petition is meant to prove your status as a U.S. citizen and the child-parent relationship that exists between you.
Therefore, you'll need to include both a copy of your U.S. passport, naturalization certificate, or other proof of citizenship, as well as your birth certificate showing your parents' names, or similar proof of their relationship to you. (Don't send originals of these or any documents—you'll never get them back.) If petitioning for both parents, you'll need to submit two separate I-130 petitions.
As soon as the I-130 petition has been approved, USCIS will forward the file to a U.S. consulate in your parents' home country. The consulate will communicate with them about how they can submit their own required application forms and documents. You'll need to submit an Affidavit of Support on USCIS Form I-864 during this stage of the process.
Before long, the consulate will call your parents in for an interview at which their immigrant visa should be approved. With that visa, they can enter the United States and become lawful permanent residents.
If your parents happen to be in the U.S. after a legal entry, such as with a visa, then yes, as immediate relatives it might be possible for them to apply for a green card without leaving the United States.
If they entered without inspection, however (such as by having been smuggled across the border) they cannot do this— and should talk to an immigration attorney about whether they can realistically immigrate at all, since living in the U.S. unlawfully for anything longer than six months creates a long-term bar to admissibility.
The process to get a green card in the U.S. is called "adjustment of status." You wouldn't even have to wait for the Form I-130 to be approved, but could submit it concurrently with the Application to Register Permanent Residence of Adjust Status, or Form I-485. (If you have already gotten their I-130 approved, simply submit the approval notice, also called Form I-797 along with the adjustment of status packet.)
But don't read this and say, "Oh, I'll simply have my parents enter the U.S. as tourists and apply to adjust status." That's a fraudulent misuse of the tourist visa, and can lead to their green card applications being denied.
Many people hope that obtaining green cards for their parents will facilitate easy travel and long visits. Unfortunately, this strategy doesn't fit with U.S. immigration laws, which require that green card holders make their permanent home in the United States.
Contrary to popular myth, there's no minimum amount of time that a person can live in the U.S. to avoid issues of "abandonment of residence" here. If your parents leave the U.S., even for a short time, and upon return the U.S. border officials become convinced that their real home is outside the U.S., the official can deny their entry and revoke the green card.
Trips outside the U.S. of six months or longer are guaranteed to raise questions, and trips of a year or more raise a presumption that they have abandoned their U.S. residence.