Background Info
The first thing to do is to consider the relativistic gyrofrequency, given by:
$$
\Omega_{cs} = \frac{ Z_{s} \ e \ B_{o} }{ \gamma \ m_{s} }
$$
where $Z_{s}$ is the charge state of species $s$, $e$ is the fundamental charge, $B_{o}$ is the quasi-static magnetic field magnitude, $\gamma$ is the relativistic Lorentz factor, and $m_{s}$ is the mass of species $s$.
Next, we consider the gyroradius or Larmor radius is given by:
$$
\rho_{cs} = \frac{ v_{\perp} }{ \Omega_{cs} } = \frac{ \gamma \ m_{s} \ v_{\perp} }{ Z_{s} \ e \ B_{o} } = \frac{ m_{s} \ c \ \sqrt{\gamma^{2} - 1} }{ Z_{s} \ e \ B_{o} }
$$
where $v_{\perp}$ is the velocity of the charged particle orthogonal to $\mathbf{B}_{o}$ and $c$ is the speed of light in vacuum.
Application
If we want to deflect a particle from its nearly ballistic trajectory, we need to make the gyroradius (hopefully much) smaller than the size of the region we want to protect.
For a 10 MeV electron, the gyroradius is ~88 km in a 400 nT field (i.e., typical field strengths at ~4-5 $R_{E}$ altitudes). The Earth's field is roughly 30,000 nT (it varies from equator to pole, but just use this to make things easy). Thus, a 10 MeV electron has a gyroradius of ~1.2 km, still much larger than the ISS.
If we kick up the fields to 1 T, then that same 10 MeV electron's gyroradius changes to ~35 mm (or ~$3.5 \times 10^{-5}$ km), which seems more reasonable. However, generating 1 T fields typically requires very massive magnets and protons will have a larger gyroradius by a factor of nearly 1800 at the same speed. The cost of launching things into space is very expensive and the price depends upon mass. So perhaps magnets are not the best option?
Generally, people on the ISS have small shelters in which they can take refuge during geomagnetic storms, but they are protected by mostly particles below about 10 MeV only. This is okay because below this is energy are the highest fluxes, thus the largest exposure.
Above 10 MeV, there is little to do and truthfully, there are reasons why you do not want to try to stop such particles. For instance, look up articles on linear energy transfer. At extremely high energies, the particle will actually impart very little energy to you as it passes through (though it will destroy everything in its path). Though I think that destroying a cell is better than damaging because the body will just kill and absorb the destroyed cell. Whereas repairs may lead to mistakes that can extrapolate to things like cancer (Note: I am not an oncologist or cell biologist, so I would recommend reading more on the subject yourself and verify my statements.).
Alternative
Another method is to use materials with high amounts of hydrogen (e.g., polyethylene) as form of protection. Such materials tend to absorb charged particle radiation (and neutrons as well) quite well but do not necessarily have to be dense, therefore not massive. High $Z$ materials like lead, tungsten, and tantalum are massive and, thus, expensive to launch into space.
Therefore, the most cost effective and practical approach is the one that is currently used, which is basically using styrofoam.
Smaller Applications
On small instruments for spacecraft, such as on the Van Allen Probes, they use multiple layers of various materials like tungsten, aluminium, niobium, and tantalum. There are occasional uses for heavier metals like gold due to its stability.
Updates
Below you will find a list of energies, Lorentz factors, and corresponding speeds for a proton given the energies in the first column.
Energy [MeV] | Lorentz Factor | Speed [km/s]
--------------------------------------------
1.0000000 | 1.0010658 | 13830.070
10.000000 | 1.0106579 | 43423.141
100.00000 | 1.1065789 | 128369.78
1000.0000 | 2.0657890 | 262326.09
10000.000 | 11.657890 | 298687.48
100000.00 | 107.57890 | 299779.51
1000000.0 | 1066.7890 | 299792.33
The corresponding relativistic gyroradii of a proton in a 1 T, 100 T, and 1000 T magnetic field (assuming all kinetic energy is in a speed orthogonal to $\mathbf{B}_{o}$) are:
Energy [MeV] | p gyroradius | p gyroradius | p gyroradius
| [m, 1 T] | [m, 100 T] | [m, 1000 T]
----------------------------------------------------------
1.0000000 | 0.1445355 | 0.0014454 | 0.0001445
10.000000 | 0.4581554 | 0.0045816 | 0.0004582
100.00000 | 1.4829707 | 0.0148297 | 0.0014830
1000.0000 | 5.6573732 | 0.0565737 | 0.0056574
10000.000 | 36.351669 | 0.3635167 | 0.0363517
100000.00 | 336.67930 | 3.3667930 | 0.3366793
1000000.0 | 3338.7693 | 33.3876930 | 3.3387693