The short version: in the beginning, there was nothing, which then exploded.
The longer version: all the matter in the universe was compressed into the smallest possible volume. Try to understand that this is so much matter that the force of gravity warps the laws of physics as we know them. The whole thing is is under so much pressure that it explodes – forming the universe as we know it as the laws of physics change radically from picosecond to picosecond, and eventually energy cools and congeals into matter.
It’s like they say: “it all started with the Big Bang!”