Japanese Language & Usage Stack Exchange is a question and answer site for
students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It's 100% free, no registration required.
Within relevant contexts, 受ける means 'to attend' whereas 取る means 'to be registered for'. If you are unofficially attending a class, you should use the former. If you are officially registered but tend to be absent, you should use the latter. Formal ways of saying it are 受講する 'to be registered for', 聴講する 'to be registered as a non-full time student for'.