How do colleges figure out if you are lying or not

Not too long ago there was a student who wasn’t happy with their private school record so their family pretended they homeschooled and created their own records. The student was accepted to a school and moved into the dorm. I think a chance mention of a social media post by someone the student knew to someone connected with the school proved to be their undoing. The student was expelled immediately.