This happened to a friend of mine. He was undocumented but doing fine, riding a bus from one place to another, and didn’t realize that when the bus wandered a little close to the southern border, CBP could essentially pull the bus over and asked to see everyone’s papers. And that’s exactly what they did. TL;DR long detention in jail and a big fight to be able to stay in the country.
In the current system, he’d probably already be gone, and under Trump 2, someone in that situation might have something really really bad happen to them.