Cosmic radiation (also known as cosmic rays) is created in deep space by strong electric and magnetic processes, stripping atoms down to the core and accelerating them to high velocities. Those high energetic particles reach the surface of Mars due to the very thin atmosphere. Like all other ionizing radiation it causes damage to material and health.
Point of origin
Cosmic radiation strikes bodies in the solar system from all directions, as they permeate the galaxy. They are made of the same particles in the same proportion as those originating from the sun; and are considered part of space weather.. How they are created is debated, but being accelerating by matter falling into a black hole, or being created by supernova are two common explanations of their origins.
Mitigating Cosmic Rays:
Cosmic rays are blocked by planets, so people on a planet (or in close orbit around one), receive half the cosmic rays that you would in deep space. (The horizon blocks out half the sky, a bit more if you are in a valley.) Cosmic rays (and their Secondary radiation) will penetrate fairly deep thru earth and rock, so only by being deep underground can they be totally eliminated. Experiments on Earth which wish to avoid cosmic rays are done in mines more than 2,000 meters below ground.
That said, people receive cosmic rays everywhere on Earth. People living at high altitudes (which get a higher dose than those living at sea level) show no higher signs of health problems. So trying to eliminate all cosmic rays is impossible and futile. But habitats with a meter of water (or a half meter of soil) between people and the sky would reduce this radiation to levels approaching high altitude regions on Earth. See Radiation shielding for more details.
Note that small electromagnetic fields do not protect against cosmic rays (tho they do help with low and medium energy solar particles). If people were somehow to give Mars a magnetosphere, (say with superconducting current around the equator), it would help against low energy cosmic rays but not against higher energy ones. (Cosmic rays strike everywhere on Earth, not just near the magnetic poles.)
The only protection from cosmic rays is lots of mass, either a thick atmosphere, or a meter or so of soil or water. Even then, the protection is not perfect. (Everyone on Earth is bathed by cosmic rays, despite our thick atmosphere and Earth's magnetic field.) Habitats in a Lava tube have been proposed as an inexpensive way to give many meters of protection from this radiation.
Acute effects on equipment
A single strike by a cosmic ray can cause three types of error in electronic equipment:
Note that modern integrated circuits (with millions of tiny transistors), are more likely to be effected by cosmic rays than more primitive integrated circuits (with a few tens of thousand large transistors). Native Mars electronic firms may chose to optimize their products for a higher radiation environment. This is one area where lower tech Martian industries may have a local advantage over Earth's. See this report about data faults caused by radiation (all sorts of radiation, not just cosmic rays). 
Chronic effects on equipment
None have been noticed after decades of work on the ISS (International Space Station).
Acute effects on life
None have been noticed on the ISS. Note that cosmic rays are a low level of back ground radiation, so they are not an 'acute' radiation dose. (Sudden bursts of high radiation are much more dangerous than low levels over a long time.) Six astronauts or cosmonauts who have spent a few long missions on the ISS or Mir space stations have received radiation doses greater (in some cases double), than the radiation dose from a 2.5 year long Mars mission. None of them have shown any health issues from radiation.
Chronic effects on life
Radiation effects on life have been studied for over 7 decades, cosmic rays (and the Secondary radiation they produce) are well understood. The chronic effects on life are based on what the long term level of radiation is. The average radiation level on Earth is 2.4 mSv (240 mrem) per year (note this includes ALL radiation, not just cosmic rays). However, the Iranian city of Ramsar has natural levels of radiation 30 to 50 times higher than average on Earth, and show no statistical increase of cancers or early death than elsewhere.  This suggests that total radiation levels of up to 100 mSv per year, would be a reasonable target for Martian habitats. This value is 5 times higher than the (very conservative) levels of radiation allowed for workers in nuclear plants. 
Since habitats have been designed, with a meter of dirt as radiation protection, which approach this value, a well constructed habitat would be unlikely to have a noticeable chronic effect on life. Poorly constructed habitats with little or no thought given to radiation protection would be expected to have a statistically higher chance of cancer (the most common form of disease caused by radiation).
- W.K. Tobiska - The space environment in J.R. Wertz, D.F. Everett & J.J. Puschell eds. Space mission engineering: The new SMAD. 2011. pp. 127-137. ISBN 978-1-881883-15-9