Keyloggers can be either hardware devices or a software program that records the real time activity of a computer user
Keyloggers capture keyboard strokes and often collect screen grabs from the computer
Often part of malware packages, some keylogger software is freely available on the internet
Keyloggers are also used in IT organisations to remotely log into computers to troubleshoot issues
According to court documents, the police were first made aware of the cheating scandal back in June last year when a science teacher, Kim Rapp, told school administrators that someone may have accessed her computer and changed grades.
In a statement to the police, one of the students alleges that he and Mr Lai had gone to the school late at night to place a keylogger on the computer of a chemistry teacher.
It is believed that the hardware keylogger was used to snoop on teachers' logins and password details with the stolen codes used to access information about forthcoming tests and to change grades in previous exams.
The school said that it was looking into the scope of the cheating scandal. It is believed school officials are re-examining 750,000 grades.