Raise the hood by simultaneously lifting and pressing up on the hood latch release (usually located beneath the front edge of the hood, near the center or center-right).
Using a correctly sized wrench or socket, loosen the nut/bolt securing the cable on the negative battery terminal.
Always disconnect the negative cable first (before removing the positive cable).
The negative terminal may be marked with a minus (-) symbol, or it may be unmarked. The positive terminal is almost always marked with a plus (+) symbol, often in red.
If the nut or bolt spins without loosening, it may be necessary to counter-hold the opposite side with a second wrench or socket.
A typical car battery can weigh 50 pounds or more, so lift carefully and get help if needed. Do not drop the battery, as this can release dangerous chemicals.
If your battery cable clamps look dirty and/or corroded, clean them up with a wire brush and a mixture of water and baking soda before installing your new battery.
To prevent corrosion in the future, coat the new battery's terminals with a little dielectric grease or petroleum jelly.
Don't throw the old battery in the trash. Many auto parts stores and service stations will accept old batteries for free safe disposal.
You should not just tell people to follow the directions in reverse order for reassembly. There are some steps most mechanics will want you to perform (e.g. applying a compound to the terminals to prevent corrosion) in addition to simply reattaching the cables.