comets and their tails

why is the tail of a comet curved? and could you estimate how fast the curvature of the tail could change?