A class is a group of "types". eg Multi Engine Piston covers all piston twin engines that doesn't need specific handling training for.
A type rating is specific to that type. eg, A B737 type rating is specific to a B737 (breaks it down further to =200, -NG etc). It doesn't cover the A319 for eg.