Pufferfish will “puff up” as a defense mechanism if they are threatened. A shape that is more than double its original size, round and sometimes covered in spines is much more difficult to bite and isn’t very appetizing to a predator. However, just as people should stretch before exercising to avoid injuring themselves, puffers need to stretch out their muscles as well. Inflating yourself full of water so that your skin is stretched tight can be very painful, especially if your muscles aren’t used to it. Even though they sometimes do it just to stretch, puffing up often can be stressful for a puffer. So, it’s best if they do it only when they need to. This behavior isn’t a puffer’s only means of defense. Most puffers are toxic to eat. Their internal organs produce a neurotoxin called tetrodotoxin (they’re part of a family of fish known as Tetraodontiformes, which includes triggerfish, boxfish and several other species). This neurotoxin, which has no antidote, can cause paralysis, seizures and even death and is another reason why puffers don’t make good meals.
Here is a great video of a pufferfish displaying its "puff up" defense mechanism in the Pacific Coral Reef exhibit at the Aquarium.