Much trial and error... Also learned from my dad (ASE), uncle (old school car nut) and the shops I worked at back while I was in high school.
I've been wrenching since 14 (almost 23 now...) I've worked on personal/family vehicles: 95 Chevy Van, 78 Pinto, 89 Probe, 86 Toyota Truck, 87 Celebrity, 86 Prelude, 94 Lumina, 87 Delta 88, 91 Tempo... the list goes on.
That doesn't come anywhere near what I've done in the shops either. One day I come in and my boss has his tractor's desiel engine torn apart and has one of the other guys scrubbing the parts down. We had the "priviledge" to put it back together.
My co-workers ask me to do this or that or what they think is wrong with their car... I can give them my educated guess. If they ask me to do some things I'll straight up tell them to go to a shop. Without proper tools or experience on THAT specific vehicle... I don't want to be responsible.
I've wanted to take some classes but with work I've been pretty busy. Check your local colleges/technical schools for any classes. Here they're $70-150/credit hour AND they you can get a grade for working on your own car. i.e. one of my friends (met online when I needed help changing my first tranny) is taking a class for tranny rebuilding. Her project included swapping out a clutch and syncros in her '95 Prelude. Another guy took a fiberglassing class and got his car (19?? Nova) patched back up.