Cosmic rays are energetic particles originating from deep space that hit our atmosphere at high speed. There are a variety of sources including our own Sun but most come from interstellar events like Supernova, Black Holes and yet unknown happenings in the outer most reaches of our universe.
Although commonly called cosmic rays the term "ray" is a misnomer, as cosmic particles arrive individually as a primary particle, not as a ray or beams of particles. 90% are Protons, 9% helium and iron nuclei and remainder electrons or other sub-atomic particle remnants.
Atom smashing energy
When these primary particles hit our atmosphere 30km above the Earth’s surface they hit with such tremendous energy they cause a nuclear reaction ripping atoms apart. Cosmic rays are known to have energies well over 1020 eV, far higher than the 1012 to 1013 eV that any Terrestrial particle accelerators can produce. These showers produce an interesting zoo of high energy particles in the earth's atmosphere such as positive and negative pions and kaons that subsequently decay into muons and muon neutrinos. Whereas uncharged pions decay into pairs of high energy photons that become the starting points of large cascades of electrons, positrons and gamma rays. The resulting flux of particles at ground level consists mainly of muons and electrons/positrons in the ratio of roughly 75 to 25 percent hitting the Earth's surface with energies greater than 4GeV at near the speed of light ~0.998c.
Time Travellers
Another interesting phenomenon of cosmic rays as they are an everyday demonstration of Einstein's theory of relativity. A muon has a measured mean lifetime of about 2.2 microseconds. But if muons are produced in the upper atmosphere (15-20 km up) and travel, on average, a distance of about 660m at near the speed of light ~0.998c then they should not be capable of reaching the ground. However Einstein theory showed that time ticks slowly for particles moving at speeds close to that of light. Whilst the mean lifetime of the muon at rest is of the order microseconds, when it moves at near the speed of light the lifetime is increased by a factor of ten or more. This gives the muons time to reach ground level.
Common interstellar events on earth that most people are unaware
Cosmic Rays are common events that happen 200 times every second, on every square metre, across the entire surface of the earth. With so much energy behind them they pass through just about everything, penetrating mountains, buildings, our bodies and deep into the Earth’s surface, without anyone really being aware of their existence other than scientists and obsessive geeks.
Below is a segment from an episode the TV program called "Cosmos" with Carl Sagan, a legend in my youth sadly he is no longer with us. Although a little out of date, I could never have put the mystery of cosmic rays better.
Video on cosmic rays and their detection. About the Fly's eye and HiRes cosmic ray detectors. From the University of Utah