Briefly:
The big bang did not happen at a single point and explode into some existing space. Instead, the big bang happened "everywhere"; since then, space itself has expanded from the initial singularity into the present size.
At first the universe was incredibly hot and dense, so hot and dense that elementary particles could not yet combine to form neutral atoms, and particles, including photons, could only travel a short distance before hitting and interacting with other particles.
As the universe expanded, it cooled and and became less dense. Eventually the density crossed beneath a threshold allowing photons to travel essentially forever without running into something; we say that the universe became transparent to photons at this time.
Nearly all of the photons that were in the cosmic soup at that time are still here. Because the expansion of the universe is an expansion of all space, the expansion carried the photons with it, so they are everywhere.
These photons, with their wavelength stretched by the intervening expansion of space, form the cosmic microwave background radiation.
A good book on the early universe is The First Three Minutes by Steven Weinberg.