The streams of dust and gas released form a huge, extremely tenuous atmosphere around the comet called the coma, and the force exerted on the coma by the Sun's radiation pressure and solar wind cause the tail of the comet points away from the Sun.
HOPE THIS HELPS