There is a switch on the motor that closes once the motor is running. Once the switch is closed it lets voltage go to the heating element.
When the motor stops running the switch should open and kill the power to the heating element.
This motor switch could be bad if you have voltage to the heating element when the dryer motor is not running.
You can not replace just the switch as the switch only come with a new motor. The switch could be stuck if it has heavy lint build up.
It could also be stuck if the contacts are pitted. Some people can clean the switches/contact to make them work again, but I find this is often a temporary fix and sooner or later the motor needs to be replaced.
Your dryer uses motor part # 279827
Here is a video you may find helpful too.Dryer Motor Help Video
Let us know what you find or if you have any other questions.