The Sun emits electromagnetic radiation which may consist of UV, IR, X-rays and also the charge particles that are emitted from the sun which are harmful to humans. But during intense solar flares it emits more radiation and even gamma rays. How are astronauts in the ISS protected from the harmful radiation?
So far, Solar flares haven't proven as dangerous as one would possibly think. They're nothing to easily dismiss, mind you, and the ISS crew does have procedures in place to "weather the storm", but nothing too spectacular has yet happened due to them. The ISS crew did receive a Solar weather warning several times and were advised to enter the more protected areas of the ISS, such as the US built Destiny laboratory, or the Russian built service module Zvezda, but they were in all instances well within the safety margins. On one occasion (in December 2006) even sleeping throughout the event.
The most interesting thing about Solar coronal mass ejections (the cause of Solar flares) is that these are highly magnetised particles, and they actually help push away other charged particles (such as high-energy protons in Cosmic rays) with the effect known as the Forbush decrease. Such particles are lot bigger concern to astronauts stationed on ISS:
Cosmic rays are super-charged subatomic particles coming mainly from outside our solar system. Sources include exploding stars, black holes and other characters that dwarf the sun in violence. Unlike solar protons, which are relatively easy to stop with materials such as aluminum or plastic, cosmic rays cannot be completely stopped by any known shielding technology.
Even inside their ships, astronauts are exposed to a slow drizzle of cosmic rays coming right through the hull. The particles penetrate flesh, damaging tissue at the microscopic level. One possible side-effect is broken DNA, which can, over the course of time, cause cancer, cataracts and other maladies.
(Excerpts and September 2005 Forbush decrease graph source: NASA Science News)
The amount of high-energy subatomic particles in cosmic rays that would penetrate ISS hull with ease (compared to protons of coronal mass ejection, that can't pass through ISS external shield / hull that easily) actually decreases during Solar flares on their way towards the Earth, forming a massive magnetic field on top of Earth's own.
Another point is, that while Solar flares can reach head spinning speeds of several millions of kilometers per hour, the average distance from the Sun is still in the vicinity of 150 million kilometers, giving ISS crew ample warning time to react, with average of at least a day's worth of advance warning, so they can prepare and move to better protected areas of ISS to "weather the storm".
On top of advance warnings due to observations of the Sun's activity by several satellites, and also ground based observations, ISS is still well within the Earth's magnetic field, which helps reduce the effects of prolonged exposure to Cosmic radiation. Solar storms can however cause other problems, such as burning sensitive electronic equipment with highly charged EM pulse, so the ISS would try and limit possible damage by other means too, and if deemed necessary, rotate photovoltaic arrays (solar panels wings) perpendicular to the impending Solar flare, rotate the whole station, or any other risk management procedure.
Image: Example of risk management: A NASA model showing areas at high risk
from impact for the International Space Station. Source: Wikipedia