Cosmic rays are high energy charged particles (some with energies as high as 100 - 1000 TeV) that are constantly blasting into the Earth’s atmosphere. About 90% of Earth-bound cosmic rays are protons (Hydrogen nuclei), 9% are Alpha particles (essentially, Helium nuclei), with the remaining 1% being light elements and electrons.
So, where do cosmic rays come from? Well, there are three main types of cosmic rays:
The first is Galactic Cosmic Rays (GCR). These are particles that are thought to originate outside of the solar system. The second is Anomalous Cosmic Rays. These rays are particles coming from the boundary of the Heliosphere; the "Heliosphere" is the "bubble" of charged particles around the Sun. The third is Solar Energetic Particles. These last kind of particles are those that are ejected during solar flares and other energetic solar events.
While we still don't know exactly where most cosmic rays originate from, it's thought that supernovae not only produce these particles, but their strong magnetic fields serve as an accelerator, launching the rays across space.
Now, you may be asking, "what happens when they (cosmic rays) hit Earth?"
Despite sounding scary, there's really nothing to be afraid of when cosmic rays hit Earth. As the charged particles close in on the planet, some are deflected away by the Earth's magnetic field. If a particle manages to make it through the magnetic field and to the atmosphere, it will likely interact with surrounding Nitrogen or Oxygen atoms. These interactions create a "shower" of particles that fall down to Earth (or further interact with other particles). Long story short, nothing that reaches the Earth’s surface is even close to the energies at which the rays started. In fact, it is this interaction that causes beautiful aurorae, like the Northern Lights.
However, outside of Earth's protective bubble, it is an entirely different story. Astronauts on the Apollo 11 mission reported seeing flashes of light when they closed their eyes; this turned out to be cosmic rays colliding with the vitreous fluid in their eyes! With no particles to mitigate the high energy of the Cosmic Rays, it's hypothesized that a trip to other planets would require extensive shielding from these rays.
At certain energies, there can be up to 10,000 cosmic rays (or their ionized particles) per square meter falling to the ground (the lower the energy, the more common the particle).
Why not detect these events yourself? Provided you have access to dry ice and necessary safety equipment, you can try this experiment at home.