That's if they let you fly there in the first place. I know someone who was denied access because they had a criminal record from over a decade ago, even though it was a minor offence (no prison sentence). This is a UK citizen, so you can imagine how much more difficult it is for someone from a less favourable country.
This is advice for Brits from the US Embassy: "Can you advise me if my arrest, caution, conviction will prevent me from traveling visa free and registering under ESTA? We cannot advise whether a traveler’s specific situation will have a bearing on their eligibility to travel visa free under the Visa Waiver Program. Our advice is that if you have ever been arrested, cautioned or convicted you apply for a visa."
Cautioned! You don't even need to be convicted or even arrested for an offence.