The Breakthrough Starshot initiative aims to launch a gram-scale spacecraft
to a speed of $v\sim 0.2$c, capable of reaching the nearest star system,
$\alpha$ Centauri, in about 20 years. However, a critical challenge for the
initiative is the damage to the spacecraft by interstellar gas and dust during
the journey. In this paper, we quantify the interaction of a relativistic
spacecraft with gas and dust in the interstellar medium. For gas bombardment,
we find that damage by track formation due to heavy elements is an important
effect. We find that gas bombardment can potentially damage the surface of the
spacecraft to a depth of $\sim 0.1$ mm for quartz material after traversing a
gas column of $N_{\rm H}\sim 2\times 10^{18}\rm cm^{-2}$ along the path to
$\alpha$ Centauri, whereas the effect is much weaker for graphite material. The
effect of dust bombardment erodes the spacecraft surface and produces numerous
craters due to explosive evaporation of surface atoms. For a spacecraft speed
$v=0.2c$, we find that dust bombardment can erode a surface layer of $\sim 0.5$
mm thickness after the spacecraft has swept a column density of $N_{\rm H}\sim
3\times 10^{17}\rm cm^{-2}$, assuming the standard gas-to-dust ratio of the
interstellar medium. Dust bombardment also damages the spacecraft surface by
modifying the material structure through melting. We calculate the equilibrium
surface temperature due to collisional heating by gas atoms as well as the
temperature profile as a function of depth into the spacecraft. Our
quantitative results suggest methods for damage control, and we highlight
possibilities for shielding strategies and protection of the spacecraft.