A fontanel is one of six membrane covered soft spots on the skull of an infant at the junction of the cranial bones which allow baby's head to slightly compress in order for it to pass easier through the birth canal during labour.
The small fontanel on the back of the head usually closes around the second month after childbirth. At the big fontanel at the front, the closure takes longer, this lasts between 6 months and sometimes 2-3 years. Incidentally, the fontanel does not close because the skull halves grow towards each other, but because the connective tissue harden.
Another reason why the fontanels are so soft: the two skull halves allow space for your child's brain to grow. In the first year especially this is very rapid.
You may hear that the fontanels are "open" but this is not really true. The fontanels are covered with solid webs of tissue. These webs are strong enough and able to protect against small bumps. It's extremely important to be careful with these soft spots.