The hard drive receives power through a dedicated power cable that connects it directly to the computer's power supply unit (PSU). Modern hard drives commonly use a SATA power cable which provides multiple voltages (3.3V, 5V, and 12V) needed for operation. Older drives may use a Molex connector for power. This power connection is separate from the data connection, which plugs into the motherboard. The power cable ensures a stable and uninterrupted supply of electricity for the hard drive to function properly, spinning the platters and operating the read/write heads inside the drive. The connection typically comes from the PSU inside the computer case and plugs into the power port on the hard drive itself. In summary, power is supplied to the hard drive via a SATA or Molex power cable connected directly to the power supply unit in the computer.
