A few reasons can cause this. Beer was not finished fermenting, too much priming sugar or improperly mixed, infection from unsanitary conditions (bottles not clean enough) to name the prime suspects.
It will take some more information from you to pinpoint exactly what went wrong in your situation.