Dennis Nedry used it for an escape route by turning the park power off, thus resetting the security locks. This enabled him to gain access to every section of the park, including the all important Dino embryo-storage unit. Finally, the virus covered its tracks by deleting itself as well as all references to it once the proper commands were given.
It also blocked any attempts to circumvent it by triggering an infinite loop if someone tried to get into the system without knowing the "magic word." This flooded the screen with "YOU DIDN'T SAY THE MAGIC WORD!" and made a cartoon image of Nedry pop up on another monitor, admonishing the user with a never-ending "Ah ah ah. You didn't say the magic word." At this point, the only way to break the loop is to completely shut down and reboot the system.
In the novel, the damage the virus caused could be reverted using the command fini.obj, but since it was built into the actual coding for the park, John Arnold had to reset the mainframe in order to clean the phone lines from the false modem sounds the virus seemed to emit. Unfortunately, when the system was restarted, nobody noticed it hadn't been running on the Main power, but was using Auxiliary power which quickly ran out. The main power had to be turned on manually, since the auxiliary power was designed to help start the actual main power generators.