Is it possible to sit in a class without registering it?
In the US, as far as I'm aware, the term you're looking for is "auditing" a class. You'll need to check your school's policy for this, as they vary.

For example, here's the audit policy for The University of Texas at Austin, which requires filling out a form, getting permission from the professor and there being space available in the class. But, when you're auditing, you only go to lectures, you don't participate in discussions or do any of the actual coursework.

This is pretty similar for other schools I've looked at but, as noted, you'll need to check your specific university's policy for it. Hopefully knowing the term will help.

For huge classes with 100+ students, you may be able to get in the unofficial way but for smaller classes of 10-30, the professor will probably notice that there's someone extra in the class, particularly if there aren't enough seats in the room.