Most school charge roughly 50% of regular tuition rates to audit a course (attend lectures without earning credits.) They will usually allow you to complete all the coursework and get feedback as part of the auditing arrangement. Getting caught attending lectures without being enrolled can have implications beyond just being kicked out...you're essentially "stealing" an education. They can charge you with theft or criminal trespass. As someone who has a criminal record for trespassing, I'd advise you to just enroll in any course you really want to attend ;-)
Agreed. Or just ask the professor. If I were a professor I'd be ecstatic if someone wanted to sit in on a lecture just to learn, not for credits.
However I've also had great professors who would allow it because they feared the students wouldn't be fully committed since they weren't obligated to do assignments and exams.