A popcorn kernel contains a little bit of moisture stored safely inside the shell of the kernel. When you heat up the kernels this moisture gets really really hot and eventually turns into steam that pops open the kernel to escape. The starch inside is initially softened by the steam, expands and then hardens as the steam escapes, leaving us with delicious popcorn we all know and love.
I recently watched a thing on TV where a guy trapped loads of popcorn in a pressurised container and heated it up. The pressure stopped the popcorn from popping until all the kernels were ready to blow. At this point he suddenly released the pressure and there was a giant popcorn explosion. All the kernels popped together in the process described well by Joseph. It was awesome!