By swallowing the Oceanid and her unborn child, Zeus became pregnant with Athena. Zeus wasn't built to deliver a baby, though, so he seems to have gestated the baby in his head. There was still one more issue to contend with: lack of an opening that would serve for the birth canal. The new goddess needed to be born. She was pressing from the inside of his head outwardly with increasingly excruciating insistence. Coming to his rescue was his (step-)son, the smithy god Hephaestus (or Prometheus), who struck open Zeus' head with an axe to release the goddess. (One can imagine gleeful pleasure on either of their parts, since this was a safe way for Hephaestus or Prometheus to pay Zeus back for the pain and suffering he had caused.)
Once the passage was open, Athena emerged from her father's head fully armed. See Homeric Hymn XXVIII. To Athena for the birth of Athena.