Internal combustion engines need three things to run. Fuel, Fire and Compression. If the correct amount of fuel (and air) is in the cylinder, and the mix is properly compressed (to somewhere near 1/9th of it's uncompressed volume), and it gets a spark, the mix will explode. Physics. It cannot do otherwise.
Granted, lots of things need to happen properly in an engine for all that to come together and happen at the right time in the piston cycle, but that remains the core principle of internal combustion engines. To troubleshoot an engine that is not running, or not running properly, those are the three main issues to consider.
Lots of things can cause a loss of compression, but they all come down to the cylinder having a leak. Mechanical wear, blown gaskets, defective seals, dirty / leaky valves or bad valve timing can all cause a loss of compression. Fortunately, serious compression loss is fairly rare...and that is good, because it is always the most expensive problem to solve. Engines are built, first and foremost, to continue to hold compression through their service life. The good news is that if you have verified fuel and fire, checking compression is among the easiest test to do on an engine. Still, it is rarely a sensible place to start your troubleshooting. Failures in the fuel supply and ignition systems are far more common.
Outside of flat running out of gas, ignition failure is by far the most common cause of an engine failing to run. And that is great, because it is the easiest problem to check directly and is often the cheapest problem to fix. The easiest ignition check is to unplug a spark plug wire, remove the spare plug, reconnect the plug wire, ground threads of that plug to the block, and crank the engine. If you can see a nice blue-white (or even reddish) spark you can PROBABLY say ignition is ok and move on. I say "probably" because if you do see a spark, you still do not know if the spark happening at the right time. If you don't see one, you do not yet know why. Maybe the plug is bad, or maybe other ignition components are bad and you still need to track that down (or maybe the kill switch is turned on!). But at least you know the next path to follow. But, there is actually something that is even easier to check, if only indirectly. And since we are trying to zero in on the main problem area quickly, easy counts for a lot. And the easy test involves the third leg of the stool...and is often a great place to start your troubleshooting.
So, we have already assumed you are not out of gas...but on a small engine, you better make sure the fuel valve (often called a "petcock") is open and fuel is actually flowing. Next up on smaller machines, including most motorcycles, is the carburetor, which regulates the amount of fuel that is supplied to the engine under various throttle and load conditions. Larger, more sophisticated, less polluting, engines get their fuel via a fuel injection system. Let's start with carbs.
Carbs have tiny passages in them, through which tiny streams of fuel flow, that ultimately get mixed with the air coming into the engine. Just a little schmutz in any of those passages can put a carb out of commission. A failed fuel pump or clogged fuel filter can also stop the music (in fuel injected motors too). If your machine has been sitting for a few months with fuel in it, there is a very good chance your carb is plugged up and needs to be cleaned. But let's not jump to conclusions.
While you can look at spark plug and get a pretty good idea of whether or not it is sparking, you cannot just look into a carb and see whether or not it is working properly. Fuel injection systems in gasoline engines are almost always computer controlled, and with proper diagnostic tools, can often tell you if and why they are sick. But for a carbureted engine that has no blinky lights, it is not so easy. What to do?
Well, obviously, you cheat. (And the cheat actually works on fuel injected engines too.)
One of the products you will find on the shelf at every auto parts store is a can of "starting fluid" or "starting spray". The can will contain a cocktail of flammable chemicals, usually including ether, which vaporizes easily and happens to burn like crazy. A spray can of starting fluid is a great diagnostic tool. Remove the air cleaner so you have a clear shot at the intake, give it a one second blast of ether, and immediately crank the engine. If it fires and runs for a few beats (perhaps for a few seconds), you now know that you have reasonably good ignition, firing at (at least approximately) the right time. You know you have at least marginal compression. And you know that you just supplied the missing element...fuel, more specifically, vaporized fuel. (Engines do not run on liquid fuel. They run on vaporized fuel.) Now you have a pretty good idea where to look...the fuel delivery system. Ignition may not be perfect, but it was good enough to fire the ether. Compression may not be perfect, but it was good enough to explode the ether. So right now the fuel delivery system is the prime suspect. Conversely, if the engine did not fire with ether, you PROBABLY have an ignition problem and should at least do the easy ignition test (pull a spark plug and check for good spark).
If you see good spark AND the motor will not fire on ether...well, now you are in for an education. It is time to dig deeper.