Hard disk
The clicking sound itself arises from the unexpected movement of the disk's read/write actuator.  At startup, and during use, the disk head must move correctly and confirm it is correctly tracking data on the disk.  If the head cannot do this, the disk controller may attempt to recover by retrying.  This may cause an audible "click".  In some devices, the process automatically retries, causing a repeated or rhythmic clicking sound, sometimes accompanied by the whirring sound of the drive plate spinning.