Work through it in order. First, switch the console off, leave it for a minute, and turn it back on — that clears a surprising number of temporary hangs.
If that fails, disconnect the charger and take the battery out for a minute or two, then put both back and start up again. A full power drain resets things that a soft off does not.
If the PSP still freezes repeatedly after both steps, the fault is likely hardware rather than software, and a replacement or a repair is the realistic outcome.