What to do right away
Stop the dryer and unplug it. Do not run one more load to see if the smell goes away.
If you see smoke or flames, get everyone out and call 911. Do not open the door to look.
Why lint causes a burning smell
Lint is dry and burns easily. When it collects near the heater, it can scorch or catch fire.
The lint screen catches most of it, but some gets past. It can build up in the vent, around the drum and close to the heating parts over time.
Other things can smell hot too, such as a coin or tissue left in a pocket, or a worn part rubbing. That is why the cause is worth finding out.
Why a technician should clean and inspect it
Wiping out the lint screen is fine, but the buildup near the heater is deep inside the machine. Reaching it means taking the dryer apart, and that is not a safe job to try with electric or gas connections in place.
A technician can track down the source, clean out the lint and check that the heater and other parts are working as they should. It helps to see what was found, and photos can show what the inside looked like before and after cleaning.