In some cases, you may be deported if you plead guilty to a crime. Whether you will be deported will depend on the type of crime and the consequences for it. If you receive a criminal conviction that leads to less than 12 months in jail, you might not have your visa canceled, and you might be able to remain in the country.
However, keep in mind that in some cases, pleading guilty to lesser charges could result in deportation. For example, many types of drug convictions, such as Driving Under the Influence of Drugs, may lead to deportation from the United States, even crimes that might have relatively minor consequences for US residents. As such, you should make sure that you work closely with a Riverside criminal defense immigration attorney to protect your immigration status as well as your personal freedoms.