Cosmic rays (also known as cosmic radiation) are high energy particles that are part of the background radiation in space. Most cosmic rays are absorbed in the Earth's atmosphere and do not reach the planet's surface. However, a cosmic ray that hits an air molecule shatters into a shower of secondary radiation traveling within 1 degree of the original direction, and much of this secondary radiation does reach the Earth's surface. About 0.390 milliSieverts of radiation per year come from cosmic rays on Earth. (100 milliSieverts of radiation in a year is the smallest amount known to cause an increase of cancer; 400 milliSieverts of radiation in a short time, (under several days), might cause symptoms of radiation poisoning.) In orbit astronauts take ~150 mSV of radiation (but this includes radiation from the sun. (Currently trying to find solar and cosmic radiation broken out from each other.)
Note that the lowest energy cosmic rays have similar energies to the highest energy particles from the sun, so the two blend into each other. Strategies to mitigate the strongest solar events will help with the weakest cosmic rays.
Cosmic rays have detrimental effects on human health.
Since cosmic rays come from every direction, being on a planet will automatically halve your cosmic ray dose compared to deep space, since half of the sky is blocked by the planet beneath your feet.
On Mars, about 1.6% of cosmic rays are absorbed by the thin atmosphere, (pretty good considering the air is 0.6% as thick as Earth). Therefore radiation shielding is required for the habitats.
Cosmic radiation comprises 85% protons, 14% alpha particles, and 1% heavy ions.
Variation because of the solar cycle
The sun has a ~11 year solar cycle. At the peak of the cycle the magnetic field is stronger, there are more sunspots, and the sun is slightly hotter. There are more solar flares (coronal mass ejections). At the low point of the cycle the sun is cooler, and less magnetically active. At the peak of the cycle the more powerful magnetic field will deflect the weaker cosmic rays away from the ecliptic and redirect them towards the poles of the sun. Note that the higher power cosmic rays will punch thru regardless, so even when the solar magnetic field is at its strongest, we still get many cosmic rays.
This change in radiation is significant, the radiation increase between the very lowest and strongest solar cycles is ~75% (tho ~34% is more typical). This suggests that we can profitably trade off lower cosmic ray doses for higher solar radiation doses by launching missions during solar maximum.
The sun for the last few decades has been unusually cool, so the the cosmic ray dose is relatively higher than, say, a century ago.
Cosmic rays when they hit Mars' soil will set off secondary radiation including free neutrons (called albedo neutrons). This is a radiation source which is very low on Earth. Water, plastics, or substances such as Lithium Hydroxide would help absorb these neutrons for long term settlements. 
- Schimmerling W. (2011, Feb 5). The Space Radiation Environment: An Introduction. https://three.jsc.nasa.gov/concepts/SpaceRadiationEnviron.pdf
- Kim MY, Thibeault SA, Simonsen LC, Wilson JW. (1998). Comparison of Martian Meteorites and Martian Regolith as Shield Materials for Galactic Cosmic Rays. NASA TP-1998-208724. http://hdl.handle.net/2060/19980237030