Both electric and gas dryers use electricity to operate but the difference between a gas clothes dryer and an electric clothes dryer is that with a gas clothes dryer the gas is what is used to dry the clothes.
In a gas clothes dryer it ignites the gas to create a flame to heat up the dryer drum and the heat from the ignited natural gas is what dries your clothes while the electric is used to spin the dryer drum and ignite the natural gas fire.
With an electric dryer the electricity heats up a heating element which dries the clothes and the electricity also powers the electric motor to spin the dryer drum around.
A gas dryer is usually much cheaper to operate than an electric dryer if you have natural gas available and natural gas dryers tend to last longer than electric dryers.