My computer keeps freezing when i click on the start menu windows xp

there can be a situation on older computers especially, when there is too much software running at the same time, the processor is single core, the memory is limited.
Then adding to that, you click, and the computer freezes, cause there's no more resources left to carry out the command.
or the computer can become infected...could be either...

You can try starting the computer in safe mode, then deleting as many unused programs as possible to free up resources. Sometimes you can get it free enough to operate again.

If you can start it in safe mode, you might back up your personal files, to a thumb drive, etc...and then wipe the entire PC and start over, with a new install of the OS.

The way XP is, a lot of times it's better to back up your files, wipe the whole thing and start over. (instead of spending a bunch of time trying to fix it)
A computer tech store can also recover your personal files, and load a fresh OS...with XP it usually works out better to start from scratch.