If your computer smells like it's burning, the first thing you should do is turn it off and unplug it from any power source. If possible, move it to a well-ventilated area. Once it's turned off, check the area around the computer for any signs of fire. If there is a fire, call 911 immediately.
If there is no fire and the smell appears to be coming from the computer itself, open up the case and take a look inside. Check all of the cables and components for any signs of damage or melting. If you see anything that looks damaged, unplug it and try to isolate the problem component.
In some cases, a burning smell can be caused by dust build-up on components or in the case itself. Use a can of compressed air to blow out any dust that may be causing the issue. Once you've done that, reassemble everything and try turning on your computer again.
If the burning smell persists or if you're not comfortable troubleshooting your computer yourself, contact a professional for help.