This seems more than a bit counter-intuitive, so let me explain. A comet's tails are made up of materials breaking of off it, such as water droplets, dust, or carbon dioxide vapor. These materials actually separate into TWO different tails - a dust tail and a plasma tail made of ionized gas (the dust tail is far brighter because its solid particles reflect sunlight better than gases in the other tail. Being that they are each called a 'tail,' one would naturally infer that the particle trail would be located 'behind' the comet, that is to say that they would be located OPPOSITE the direction in which the comet is moving.