Before I describe the physics, let me tell you that you already know most of this. The molecules in the earth's atmosphere scatter light from the Sun. Because of the quantum mechanical properties of the molecules, they scatter blue light more efficiently than red light.
The colour of the sky during the day is blue, because it is (predominantly) the blue light from the Sun that is scattered toward you. At sunset or sunrise, the sun light passes through a lot more atmosphere than at midday. The increased path length causes the enhanced reddening of the sun. This is partly due to scattering, partly due to absorption on little dust grains. The same processes of scattering and absorption also occur in the ISM.
Scattering changes the direction of the incoming photon, but not
its energy. This type of reflection can also induce polarisation of the
light, if the dust grains are aligned in a given direction, for example
due to a magnetic field. You know that scattering can cause
polarisation: expensive sunshades are polarised, so as to block
incoming polarised light reflected from the ocean, or road surface for
example. So dust grains may scatter some of the light coming from a
distant star out of the line-of-sight, thereby reducing the amount you
detect, and hence decreasing the apparent luminosity of the star. Given the
typical size of interstellar dust grains, blue light is scattered more
than red light, and hence scattering also leads to reddening. Now if
you look at a dust cloud, you may actually detect some of the light
scattered off dust from a nearby bright star for example. And so such a
reflection nebulae is typically blue (so for the same reason that
the sky is blue, except it's scattering by dust (for the reflection
nebula) vs by molecules (for the earth's atmosphere)).
When a dust grain absorbs a photon, it can sometimes undergo a
change in structure, for example a molecular bond is broken or an atom
or molecule gets into an excited state. The energy of the photon is
converted into another form of energy, and is lost to us: the photon is
absorbed. Again, the effect of absorption is to decrease the
amount of light we detect from the star. Very often, the dust grain
will emit other photons, but at much longer wavelengths, typically in
the IR. For example in star forming regions, young stars produce large
amounts of dust. Even though these stars may be very bright, we cannot
see them at visual wavelengths because of the dust absorbs their
light. The absorbed light is re-radiated in the IR, making the region
very bright in the IR. And so you understand that the newly planned
space-telescope which will work in the IR, will teach us a lot about
star forming regions.4.1
The scattering and absorption by dust grains may seem to be just a nuisance for astronomers, given that they decrease the amount of starlight we observe. But because the absorbing properties depend on the size and composition of the dust, we can learn about dust properties by studying their effect on star light. And so this is how we infer the typical size and composition of the grains. Although the amount of absorption typically decreases with increasing wavelength, there is much more absorption at some specific resonances, which teach us that some grains have graphite in them (graphite, like diamond, is a phase of carbon), and also silicates (we detect the resonance at the energy of the Si-O chemical bond).