If you are a person with non-citizen immigrant status and you have been accused of a crime, you may be find yourself facing deportation or loss of your visa, and in extreme cases your may be stripped of your citizenship. The difficulties in cases are great from a legal point of view, because any lawyer who represents you must be well informed in both criminal law and immigration law.
If you find yourself in a position in which you have been arrested, you should never, under any circumstances plead guilty to any crime. Even relatively insignificant crimes can get you thrown out of the country. It is always best to take to a lawyer first, who can advise you on the best course of action.