If you have been convicted of a felony, you are right to be worried about the prospect of deportation (removal) from the United States. There are two issues to worry about, depending partly on whether or not you were here in valid, documented legal status to begin with. These include whether you will come to the attention of immigration authorities, and whether your crime is on the list of crimes that make a person deportable.
Once you've been arrested, jailed, or imprisoned, increasing communication between law enforcement personnel and immigration authorities make it likely that the latter will learn of your arrest. They may put an immigration "hold" on you, meaning that as soon as you're about to be released from jail or prison, you will instead be transferred into immigration custody. There, you're likely to face immigration court proceedings.
If you are not in the U.S. with a valid visa or green card, your removal (voluntarily or otherwise) is highly likely at this point -- but consult an attorney just in case.
If you do have a green card, you may be able to defend yourself in court, but see the next discussion for more detail.
Even if you already have a U.S. green card, a number of types of crimes can make you deportable. The immigration statute doesn't list crimes, per se, but describes a broad category of offenses that can lead to deportation.
For example, some crimes of "moral turpitude," as well as those involving controlled substances, firearms, and domestic violence, as well as "aggravated felonies," are among the many that can make a person removable. What's an aggravated felony? It can include everything from murder, rape, and sexual abuse of a minor, to other crimes involving violence, to theft, drug and weapons trafficking, and more.
Many of the crimes that have been interpreted as "aggravated felonies" were called misdemeanors by the state court that convicted the person. The message here is that you'll need an attorney's help to figure out whether your crime is, indeed, a ground of deportability.
The specifics of what constitutes a deportable offense are often based individual facts and recent case law. If you have been convicted of a felony you would be best served to contact an immigration attorney for a full analysis and possible defense against removal from the United States. And if you're still facing felony charges, call an immigration attorney right away. Your criminal lawyer may not realize the various ways in which your conviction, guilty plea, or sentencing will impact your immigration status. With an immigration attorney's help, you may be able to negotiate a result that's less harmful to your rights as a U.S. immigrant.