All things criminal are illegal, but not all things illegal are criminal. Speeding and other traffic violations are illegal, but they’re not criminal. Overstaying your visa (most common form of illegal immigration) is, IIRC, a civil violation but it’s not a criminal one either.
That said, I don’t think what the initial post said is entirely true either and will make that a separate reply.
All things criminal are illegal, but not all things illegal are criminal. Speeding and other traffic violations are illegal, but they’re not criminal. Overstaying your visa (most common form of illegal immigration) is, IIRC, a civil violation but it’s not a criminal one either.
That said, I don’t think what the initial post said is entirely true either and will make that a separate reply.