In 1965 two scientists, Penzias and Wilson, discovered that microwave radiation could be detected coming from the sky in any direction. They were actually looking for something else so the discovery of this background radiation was an accident.
When the Universe was much younger than it is now, about 300,000 years old, it was a lot smaller and a lot hotter. Most of the radiation flying about then had a wavelength of about a millionth of a metre (1 µm ) and the average temperature of the Universe was about 3000K. Since then the Universe has been expanding and still is. As it expands it cools and the average temperature falls, now it is about 3K. The radiation has been stretched out to a much bigger wavelength as space has been stretched and so it is now at 1000 times the wavelength, i.e. it is now about 1 millimetre, microwaves. This is what we now detect as the CMBR.
Nevertheless it is the same radiation that was flying around when the Universe was much younger. We can detect radiation from the young Universe. In 1989 NASA sent up the Cosmic Background Explorer satellite to measure this radiation accurately in all directions. One of the things it produced was the image above which shows a slight variation in the level of the CMBR. This tells us that at 300,000 years old the Universe was not perfectly uniform but had started to clump together into denser, hotter regions and less dense cooler regions.
When we look at stars in the sky which are many light years away we are actually looking into the past. If a star is 100 light years away then what we see is light that was emitted by the star 100 years ago. So the further we look into space the further back in time we are looking. When we detect CMBR we are looking back about 13 billion years.