To replace the hard drive in a MacBook, follow these steps: 1. Disassemble the screws holding the hard drive in place. 2. Unplug the hard drive ribbon connector. 3. Prepare the new drive, secure it in place, and reconnect the ribbon. 4. Partition the new drive using Disk Utility.