You probably did bottle while fermentation was still happening, though another likely culprit (and something that's happened to be twice!) is misjudging the amount of beer you have.
If you set out to do a n
-gallon batch, you can either plan on doing a partial boil and forget to add the extra water at cooling time (my first batch,) or fail to correct for boiloff (my second batch.)
The best solution is to grab your bottle opener and lift the cap of each bottled beer just enough to let the CO2 in the headspace vent. If your beer is severely overcarbed the foam will rise, in this case stop right when the foam reaches the cap and starts to bubble out. If you're gentle, the seal will close again and you can let the foam die back down and repeat the process later if needed, until the beer is the correct pressure.
You don't even have to recap the beer after, the caps are tough as nails and the seal's still good enough to protect your hooch even after it's been cracked once or twice.