To pervert something is to corrupt it. For example, you could "pervert the course of justice" by lying on the witness stand.
Another common use of pervert is as a word for a person who is sexually deviant; however, people also use this word more loosely to describe anyone who seems creepy. Perverting also means changing or subverting something. A cop who breaks the law is perverting the law. A criminal who convinces other people to become criminals is perverting them. So when you think of pervert, think change — change for the worse.