You'll find this answer within chapter 20. The death threat is discovered when a Pakistani journalist from Alaska comes to meet Malala and her father. The journalist speaks to Malala's father, and Malala can tell that something serious is being discussed. The author notices there are tears in the journalist's eyes and her father looks upset. They both look at something on the computer, but quickly shut the laptop.
Finally, her father decides to share this news with her, and this is when Malala finds out a death threat has been made against her. When they google her full name, Malala Yousafzai, they find a written death threat online from the Taliban, simply labeled "should be killed." You'll find Malala's initial reaction below:
"I took another glance at the message on the screen, then I closed the computer and never looked at those words again. The worst had happened. I'd been targeted by the Taliban."