If you came here illegally - as in crossing the border without a proper Visa - you're an illegal immigrant. If you assault or try to run over an ICE officer you might get stopped in self defense.
That's law. It's pretty much law everywhere. Mexico certainly arrests people they catch sneaking across the border ILLEGALLY.
No, Mexico does not certainly arrest people they catch sneaking over the border. People from Nicaragua, Honduras, Guatemala.... don't just take a big leap over Mexico and land in Texas.