It depends whether you are an immigrant or a non-immigrant. U.S. citizens cannot be deported. If you are an immigrant and you have a green card, you can be deported for certain criminal convictions – crimes that are referred to as aggravated felonies. Aggravated Felonies are often violent crimes against a person, like assault with a deadly weapon. Many crimes which carry a conviction of a year or more can become an aggravated felony. Even if your crime was not aggravated, it may still be considered a Crime of Moral Turpitude. Knowing how the crime is classified or how you may be allowed to plead in your criminal case requires an experienced attorney because conviction of a crime is a major source of people being deported.
Other reasons for deportation include people who violated their immigration status in some way, someone who works illegally, or someone who overstays a visa.
Similarly, someone who enters the U.S. illegally, that is without inspection and permission, can be deported or removed.