Lenovo laptop want to factory reset


i have a lenovo laptop that was given to my daughter at school and i want to factory reset it but i am afraid that it might lock and i wouldn't have the password to reactivate it how do i go about fixing the problem without locking it