Somebody who was "legal" meaning entered with inspection is not an illegal alien nor can he become one. He would be out of status. Don't throw around terms of which you don't know the meaning.
Out of Status vs. Illegal Immigrant
1) Out of status
Somebody who entered the U.S. "with inspection" which means with a visa or as part of the VWP. Such a person applied for a visa at the U.S. consulate in their home country. They had an interview and needed to submit a police certificate. They were issued a visa and then they were inspected again before being "admitted" to the U.S., at which time they received an I-94 (Entry/Exit) form in their passport.
The U.S. government knows everything about them; their name, their parents’ name, their birth day and birth place, their criminal history, work history, and even where they are staying in the U.S.
2) Illegal immigrant
Entered the U.S "without inspection" (EWI) by hopping a fence, swimming through the Rio Grande, or hiding in the trunk of a car. The U.S. government knows absolutely nothing about them. Not-a-thing. They could be mass murderers or serial child rapists, drug smugglers or worse.
The difference is easily explained by comparison:
You are having a party. You invited a guy to that party and when the party is over he's still staying. All you need to tell him is to leave, and if he does, you have no problem. That's the guy who overstayed.
But if you don't have a party, come home, and there's a guy who climbed into your house through the back window, and you have no clue if he's just a thief or worse, that's the illegal immigrant. Here you need to call the cops and they have every right to arrest him for a crime.
How would somebody who is out of status being caught? By getting in contact with law enforcement after having broke a law. A police officer will not question a person's immigration status if he has a valid driver's license. But if the license is expired they will book him. And if he was booked due to a DUI or reckless driving or having caused a serious accident, the wheels of justice may get in motion. Somebody who is able to renew his driver's license by mail several times and doesn't have to work for a living or is self-employed may get away with this for decades.