Neutralize heavy corrosion with a mixture of baking soda and water. Clean the inside of the terminal clamps with a cheap wire brush found at auto parts stores. Mark the positive cable so you do not forget which one it is when you reconnect. Remove the negative cable first, the positive cable and then the hold-down bracket or clamp. Dispose the old battery by exchanging it when you buy your new one or at a recycling center.
Batteries contain large amounts of lead and acid.
After removing the old battery, be sure that the battery case or tray and cable connectors are clean. Place the replacement battery so that the negative cable will connect to the negative terminal. Reversing the polarity of the electrical system will severely damage it. After replacing the hold-down bracket, reconnect the positive cable first and then the negative cable. Some more words of caution, do not ever disconnect a battery cable from running engine because the battery acts like a filter for the electrical system.