If either the motor or ESC is bad or of bad design it can cause them both to burn. Flashing the wrong ESC firmware can also do this.
Sometimes both will burn at the same time. Swapping parts around without using a current limited power supply or battery with a light bulb in series can cause you to burn more good components.
One symptom of a partially burned motor (still unusable) or motor with bad connector (or even a partially burned out ESC) is that it just jumps back and forth and will not start, but ESC/motor incompatibilities will make it hard starting too. If you see this, most people will try to give it more power to get it to start, but that can turn an incompatibility into a burned motor or ESC.
99.9% of the time, if you see smoke, that part (at least) is ruined.
Once you have a bad motor or ESC, you must be very careful to avoid causing more damage to good components by swapping stuff around and burning more things out. To safely test ESCs and motors insert a large 12V automotive bulb such as #1156 in series with your battery to power the system so that even if the ESC shorts out, that the light bulb glows then and keeps max current from getting very high. You can even test motors for continuity with this. You should be able to start and run motors at slow speed (faster without props). When you see the bulb start to glow you are getting close to the fastest it will run without resetting.
to esc (-) <------------- (-) battery (+) ----- bulb ----------> to esc (+)
If you have very tiny motors (max current less than 2 amps), you may want to find a bulb with a smaller current draw for testing. High current bulb for really big motors.
You can test a motor directly this way: Unplug it from the ESC and use an Ohm meter set on lowest scale (like x1 ohm) (or a light bulb and battery) to test continuity. Each of the 3 leads should appear directly connected to the other two. If you find any with no connection, mark that motor as bad and keep it for parts. If motor wires are labeled as A, B, and C, then you only need to test A-B, A-C, and B-C.
Due to ESC manufacturing tolerances, the BECs inside the ESCs produce slightly different voltages. Like 5.05V, 5.09V, 5.10V and 5.15V. In this case the 5.15V will be supplying all the power (for FC, receiver, and servos) and gets a little warmer than the others. This is normal.
GPS will only light up when it is plugged into the FC and the FC is powered with a battery via the ESC/BECs. Also, unplug it and use a magnifying glass to look at the FC socket where it is plugged in. Look at the tiny pins. Are any bent? Be aware that what ever voltage you power the FC with, it directly connects that to power the ports. The FC may be able to accept higher voltage than 5V or 6V, but some of the things plugged in the FC may not be able to handle it. You should always power the FC with 5V or 6V and never connect the flight battery directly to the FC.
It should be impossible for the FC to make motors or ESC's burn out. The FC only tells the ESC how fast to run. Use PwmSync or PWM@490Hz for your ESC protocol (as set in the FC on the Output page) until you get it all working and actually have a real reason to change it. Or unless you know for absolute sure that your ESCs will not run these protocols.
https://forum.librepilot.org/index.php?topic=2152.msg17429;topicseen#msg17429https://forum.librepilot.org/index.php?topic=3434.msg23481;topicseen#msg23481https://forum.librepilot.org/index.php?topic=3795.msg25971#msg25971https://forum.librepilot.org/index.php?topic=3060.msg21284#msg21284https://forum.librepilot.org/index.php?topic=4533.msg30874;topicseen#msg30874and a general search for ESC and bulb which turned up these other posts
https://forum.librepilot.org/index.php?action=search2;params=eJwtjMsOgjAURH_FuHEzC-6lCHxN01cEA9S0RWPSj_di2M05Mxnj32ZzwddbpXqtNv0TGC0UOtzRY8AIakAEYlALUqAONIBGcAOWNYNbsAL34EFu8hQ_2sX1tYQSzuu822dwRcdt-Yo6TExF-zkJ-ZDdaYRmr9f8ODiY5CYxUl_svtgfe_o4Rg..