There are characters, there are challenges, and sometimes there are artful ways of making one out of the other. Filch is a minor-league adversary, the Hogwarts's custodian who fulfills the all-important duty of skulking around in the dark and looking creepy. He really doesn't have much more to do, but it's clear that he doesn't much care for the kids and delights in catching them all in the act of being naughty.
Naturally, this puts a severe crimp in Harry's style, since he's all about sneaking out after curfew and getting to the bottom of Scooby-Doo-esque mysteries. Filch becomes a sort of walking, talking obstacle course, someone to slalom around in the quest to find out what going down in the Hogwarts's basement.
He has enough personality to make him interesting, but otherwise, he's basically another, less scary version of the giant chessboard that knocks out Ron.