The ion tail is thin, blue and linear - points directly away from the Sun.
The dust tail is white, broad and points generally (but not precisely) away from the Sun
What is happening?
The ion tail is made up of ions (surprise!) - mostly CO+, N2+, CO2+. As the comet comes into the inner solar system, the Sun's radiation heats up the nucleus, "boiling off" and ionizing these gases.
These ions are electrically charged particles, and interact with the sun's solar wind (charged particles coming from the sun). The interaction between the comet and the solar wind distorts magnetic field lines, causing a cometary magnetotail which points away from the Sun. The charged ions stream along the magnetic field lines in the magnetotail, so the ion tail always points away from the Sun.
CO+ absorbs sunlight and flouresces, emitting energy at a wavelength of 4200 Angstroms, which is blue light.
The dust is not necessarily charged -- why should the dust tail point away from the Sun?
I. Radiation Pressure
Remember that photons (particles of light) carry momentum:
And that force and momentum are related by
Photons emitted from the Sun carry momentum outwards in a spherical shell (since they are radiated in all directions). Since pressure is force per unit area, the pressure these photons would place on an imaginary shell around the sun is
Rather than assume an imaginary shell around the Sun, look at a single grain of dust. How much of a force would this grain feel. Force is the pressure applied times the grain's cross-sectional area, so it would feel a force
So this is the force it feels from radiation pressure. But it also feels the force of gravity (from the Sun):
If a grain is big, it has a lot of mass, so gravity wins. If a grain is small, it has less mass and radiation pressure wins. When does this balance occur?
Putting in typical numbers, we get R=0.006 cm -- small! Grains smaller than this will be pushed away from the Sun. Grains larger than this will be left behind along the comet tail (what will they become?).
Actually, grains MUCH smaller than that won't absorb solar radiation as efficiently, so something else must be pushing on them -- solar wind collisions.
Both radiation pressure and solar wind collisions are less effective at pushing on dust particles than magnetic fields are at containing ions, so the dust tail is broader than the ion tail, and it is not as precisely aligned away from the Sun as the ion tail is.
Finally, the dust tail reflects sunlight, so it appears yellow/whitish in color.