Voldemort, who was clinging to the back of Quirrell's head, was weakened by the fact that he was sharing a body. He was also weakened by the protective charms placed on Harry Potter, which were inadvertently passed onto Quirrell when he tried to touch Harry. When Quirrell tried to kill Harry, Voldemort's weakened state caused him to be "burned" by Harry's protective charms, effectively killing Quirrell and severing the connection between them.