dryer runs for 3 minutes then shuts off

aT FIRST MY DRYER JUST SHUT OFF ONE DAY AND WOULD NOT COME BACK ON. I let someone work on it and now it will come on, but after about 3-5 minutes (after it get very hot) it will shut off. I can go back and start it again but it will only stay on for a few minutes.