If you have a criminal record, you shouldn't even think of going in for your green card interview (at a U.S. consulate or an office of U.S. Citizenship and Immigration Services, or "USCIS") without first having an attorney analyze your case.
No matter the basis upon which you're requesting an immigrant visa and/or green card (U.S. lawful permanent residence), it can be denied if you are found "inadmissible." Many crimes will make you inadmissible.
There's no point in hiding any crimes in your past. If you're applying from within the U.S. (for "adjustment of status"), the government will likely turn them up when it runs your fingerprints, which it collected during your biometrics appointment. And if you're applying overseas, the government may require you to supply local police certificates, and may conduct additional investigations.
If you've already lied on your green card application, you've got double trouble. Lying to obtain an immigration benefit is taken quite seriously by the immigration authorities, and is itself grounds upon which to deny you the green card.
The types of crimes that can lead to a green card being denied are found in Section 212 of the Immigration and Nationality Act (I.N.A.). If you try to read them yourself, you'll appreciate why getting a lawyer involved in your case is essential.
The list doesn't only mention specific types of crimes by name, but says, for example, that you can be denied a green card for any crime of "moral turpitude."
What's moral turpitude? It's difficult to say, but usually means a crime that is especially bad given local norms and customs. (There's a limited exception for this one, if you were under 18 when the crime of moral turpitude was committed, were released from any confinement more than five years before the date of application for a green card, the maximum prison penalty possible for the crime was no more than one year, and you were not sentenced to prison for more than six months).
Other crimes on the list include things like controlled substance violations, multiple criminal convictions (two or more) where the total prison sentences were five years or more, illicit drug trafficking, human trafficking, prostitution, money laundering, and so on.
If you attend your green card interview in the United States, and are denied because of a crime that makes you inadmissible, you can expect to be placed into removal proceedings.
Even if you have some other status to fall back on, such as a temporary work visa, your crime might also make you removable if it is on the list of crimes that make a person deportable from the United States. That's a separate list, which which we won't cover here. Either way, the result is the same. You're likely to be removed from the United States.
If you are accused of a crime, the best thing to do is to consult with an immigration lawyer immediately, even if you already have a criminal attorney.
Do not plead guilty to even a small crime without analyzing its immigration consequences. Even pleading to a minor misdemeanor in order to get community service or otherwise avoid jail time could turn into a huge mistake if you plead, for example, to a crime of moral turpitude.
What's more, your criminal attorney is unlikely to be aware of the immigration law definitions. This is a whole separate specialty of the law. An immigration attorney; ideally one who specializes in criminal matters; can help decide on a plea or other strategy for minimizing the consequences for your green card application. By the way, don't be surprised if the attorney has you do a new fingerprint check, so that the attorney can find out ahead of time exactly what the immigration officials will see.