First of all, you will need to make sure that the cable you are using to connect Micro:bit with the computer is designed to be a data transfer cable (i.e. it has all of the wires inside it populated) rather than just being a charging cable. Some charging cables that come with mobile phones and other portable devices only have the power wires fitted - which means that your micro:bit will power up when plugged into the USB of your computer, but you will not be able to drag and drop code on to it. When the micro:bit is powered from USB, the yellow system LED on the back will light.
Also, if one USB port does not work, you may try another USB port on your computer, sometimes the problem gets fixed this way.
Micro:bit can only carry one .hex file at a time. If you move a new .hex file, it will replace the previous one. You can’t drag and drop more than one hex file at once onto your micro:bit. If you try to drag and drop a second hex file onto your micro:bit before the first file has finished downloading, then the second file may fail in different ways.
If the micro:bit runs out of resources or detects a fault, it enters a 'panic' routine which displays a sad face on the micro:bit screen followed by a number (for example, 020). In all cases, pressing the reset button on the back of the micro:bit will restart the program, which clears out the RAM memory and starts again.
You can consult this page for the details of any specific error code.
To reset your micro:bit to run the default program that came with it (called the Out Of Box Experience), download and flash this .hex file via USB.
If you are unsure on how to do this, follow our article on How to transfer code onto the micro:bit via USB.
You may go the Micro:bit (General Questions) page to find more FAQs.