All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
There is no doubt that skipping classes is forbidden if it violates the terms and conditions that the school or college stipulated when the student enrolled in it. Allaah, The Exalted, says (what means): {O you who have believed, fulfill (all) contracts...} [Quran 5:1] The Prophet, sallallaahu ʻalayhi wa sallam, said, “The Muslims are bound by their conditions, except a condition that forbids what is lawful or permits what is unlawful.” [At-Tirmithi: hasan saheeh (good or sound)]
Likewise, if skipping the classes involves cheating and lying, as in the case of skipping classes and arranging for proxy attendance with the help of a classmate, for instance, or any given means to deceive the administration and teachers into believing that the absent student actually attended the classes, then that is considered cheating, which is prohibited in Islam. The Prophet, sallallaahu ʻalayhi wa sallam, said, “He who cheats us is not one of us.” [Muslim] Please, refer to fatwa 270745.
As for dealing with the people who do so, you should advise them and remind them of Allaah. Tameem Ad-Daari narrated that the Prophet, sallallaahu ʻalayhi wa sallam, said, “Religion is (built on) advice.” The companions asked, “To whom?” He replied, “To Allaah, to His Book, to His Messenger, to the leaders of the Muslims, and to the common folk.” [Muslim]
Allaah knows best.