This depends a lot on which type of hard drive that your computer has installed. More often than not this will occur with a HDD (hard disk drive), but can happen on other types of hard drives as well.

Examples of certain signs to look out for-

-When your computer starts to slow down.

-Files or programs are corrupt on the device.

-When you check the performance of the hard drive on the task manager and it shows that your computer is running 100% of the hard drive.

-Your computer blue screens on boot.

-Your computer starts to make sounds that don’t sound right.

-And many other examples.

Below is a link to a Techspot Article that further goes over signs of a hard drive failing.