Hatala's (Chem 1aa3) core was really packed because it was at like 10 or 11, and he said its fine if you attend his section even though you're not registered, but if its especially packed, you should take the initiative and give up your seat if somebody whos registered in the course can't find a seat.
(but I suppose it depends on the professor)
This one kid ragequitted the lecture because it was so full...
its always obvious when there are lots of people attending the wrong lecture time, so try to be considerate
edit: oh, and if your course requires iClicker participation or attendance taking, etc -- you have to go to your own, otherwise it won't count (usually)