Could anybody tell me the primary differences between mogas and avgas?
Chemically speaking, The difference in the fuels is the inclusion of lead-based additives that increase the Octane rating of the fuel, which are otherwise banned for use in other settings due to the negative effect on air quality. The other common use of leaded fuels I can think of is in auto racing, which also doesn't particularly prioritise air quality. Unleaded high-octane fuels do exist for aircraft engines, but those engines have to be certified to use those fuels, a long and expensive process. This is why they are less common.
Octane rating itself measures how resistant the fuel is to detonation.
Engines run at a specific level of compression. Simplistically, More compression produces more power, which is important in smaller piston engines. But having too high a compression ratio causes the mixture in the cylinder to detonate on it's own before the proper point in the timing cycle where it should be ignited by the spark plug. This is called 'knocking'.
In the best case, the result is increased fuel consumption as the ECU (ironically) throws more fuel into the mixture to reduce the possibility of detonation (at least in fuel-injected car engines this the case). In the worst case, the result is damage to the engine as uncontrolled detonation can put large unwanted loads on the crankshaft and the con-rods. Power output will be reduced in any case, which can be a massive issue for heavily laden aircraft attempting to climb in high or hot conditions.
The main difference is avgas is based on completely different chemistry, paraffin (the flammable component of candle wax) and mogas is based on aeromatic hydrocarbons (like benzine). (Forget about alcohol - mogas MUST be alcohol free)
The paraffin base makes avgas much more stable (so it can be stored a long time) and it has a much lower Reid Vapor Pressure (a much higher boiling point, to avoid boiling, or vapor lock, at altitude.)
Avgas's paraffin chemistry makes it more dependent on tetraethyl lead to achieve its octane rating, which is much higher than mogas in the first place, whereas mogas's naturally more detonation resistant chemistry, lesser vapour pressure requirements and lower octane requirements allowed for lead to be eliminated in the 70s using other means to achieve its octane rating.
The main practical differences in general aviation are mainly that it's not a good idea to store an aircraft with mogas in the tanks for long periods because it will go bad sooner (not more than 3-6 months with modern mogas) and you will get vapour lock more readily with mogas so you can't fly as high, and heat exposure to the fuel system has to be controlled (such as by using air-blast shrouds on fuel pumps). Vapour lock is less of a problem on gravity fed systems because there is positive pressure all the way through the system. Pump-uphill fuel systems have suction in the fuel lines which is like climbing to a higher altitude.
Pilots generally only use mogas in carbureted engines meant for 80-87 avgas but you can use 94 octane mogas in a 100 octane non-turbocharged engine without problems (in Canada, commercial bush operators can use mogas by STC/STA in supercharged engines like R-985s, so the octane rating isn't that big a deal on engines with 8:1 compression).
I use mogas in my own airplane, who's low compression 80-87 engine is much happier on it than 100LL (not having to clean lead fouled plugs regularly). The most noticeable differences is it makes a lot more black soot in the exhaust for some reason, with the same leaning practices. I add the occasional tank of avgas periodically because the lead has a beneficial lubricant effect on valve seats.
Another minor issue is leaded aviation fuel doesn't like synthetic oil. Synthetic oil's chemistry can't keep the lead is suspension so it forms "lead paint" inside the engine. This was a problem when Mobil AV1 aviation oil was introduced (there was a big class action lawsuit). On mogas, synthetic oil is not a problem (I use Aeroshell 15W50 semi-synthetic in my plane).
Mogas and avgas are very similar ; the difference is in ratio of high octane to lower octane components . The major group of high octane components are aromatics; the xlyenes with octanes well over 100. Also some parafinics like octane ( which is 100 octane ). Also some products from alkylation ( "alky") but I don't know the specific compound names. Xlyenes are expensive because they are produced in expensive complex reformers which use high temperature high pressure hydrogen and often platinum catalyst. Also the competing use for xylenes as the raw material for polyester. Alkylation is less expensive using concentrated sulfuric or hydrofluoric acid at below ambient temperatures. Most components in mo gas come directly from distillation ( pipe still) and cat cracking ( very high temperature but easy to contain low pressure,) so are relatively inexpensive. I doubt there is much alcohol in avgas as it has 10 % less energy per pound.