The MacBook Pro battery is based on lithium-ion technology. Swelling of the battery can be caused basically by two different things:
The functionality of the battery is based on chemical reactions within its components. These reactions happen when you charge the battery, and when you use it to power your device. However, as time passed, this reaction is no longer perfect, and gas can be produced as a byproduct. This gas makes the battery swell.
The second cause is that the battery is internally structured in "compartments" that are seperated from each other. If for some reason tiny holes occur in the membranes that make out the separation, then moisture from the air could make it into the battery and react with the chemicals. This can cause swelling as well.
In either case, a swollen battery is not fit to be used - and should be handled very cautiously as it is a safety issue as well. A swollen battery could break out in fire spontaneously.
I would suggest disposing of the battery via the correct channels immediately.
The battery needs to be replaced with a new battery in order for you laptop to function again.