Mostly you learn various maneuvers from watching others but for me I often learned to do things by accidentally doing them first then repeating them. Sometimes I would see someone do a surf maneuver that I wanted to do and then I would try it. Once I saw a picture of I think it was Barry Kanaiaupuni (my favorite surfer back then) doing a turn off the lip with his fin popped up above the top of the wave. I thought about doing that and how it would feel and how I would set up for it. This seems to be an important step at least for me, call it mental imaging. I would imagine doing the procedure go through the steps mentally and then go do it. I was able to do this trick on my very first attempt after a few days of thinking about it.
Most of what I did I did by accident first. I used to do a side slipping takeoff. I did this by accident the first time and it became a routine for me. On late critical takeoffs you want your board to go sideways on the wave as soon as possible to avoid getting crushed by the lip. If you drop straight down the face of the wave on a late take off you may just get clobbered by the lip before you have a chance to make a bottom turn. So one time I turned right at the top of the wave but my board slipped down the face of the wave because it was so steep that the fin was out of the water. Once the fin engaged the water then I was propelled sideways away from the lip. On numerous waves at Horners I could feel the lip pushing me down the wave but once the fin caught I shot out ahead and proceeded to get tubed usually. I also did this maneuver at Kalihiwai because the waves were steep and fast and broke right in front of a cliff. Doing this at Kalihiwai meant guaranteed getting tubed. Had I thought about doing this on purpose I would have thought it was too difficult. Now I have a quad which refuses to do this so I have to overcome my natural instincts to try to do it.
When you surf with your back to the wave (backside) things are little more difficult. The shape of your body conforms better to a tube facing the wave than with your back to the wave. If you are in the tube on a big enough wave frontside (facing the wave) You can make little turns to speed up but backside it's difficult and you may contact the lip with your head or shoulder which means you will likely fall unless it is just a quick touch and you have good enough balance to recover. I thought about doing a larger turn so that my feet were higher than my head so that way I wouldn't contact the lip. I imagined it over and over again. One day I was at Kealia beach on a good sized day with fast lefts breaking (backside for me) and I did it. It instantly became part of my backside tube riding bag of tricks. I was able to do it the first time and almost every other time I tried it. I loved to do this turn but only did it under the pitching lip of a fast breaking left. It felt great because for a moment I was upside down, weightless and the water was inches in front of my face.
Another trick I learned was one that I did by accident first was the one I mentioned before where it turned under the lip on a frontside wave and it smacked me in the chest.
I loved to surf fast waves with lots of sections. I guess that is what I learned on so that's what I loved to do. Lots of guys like the perfect wave but for me I like more chaotic waves that make you work at it to stay on the wave. I would do multiple turns to get speed up dropping down the wave then jumping back up to the top and dropping back down again. If you keep sideways motion while doing this you can get going really fast (with the right board). I think of it as weighting on the bottom compressing your weight into the board then unweighting and releasing your weight going back up the wave back to weighting down the wave. This led to me doing a trick we called a re-entry. I was speeding up along a fast wave and made a bottom turn only to see a large section break in front of me. I was going so fast The board kept going along the wave riding over the top of the lip and going basically over the falls landing back down in front of the section since I had been going so fast and I kept on the wave for a several more maneuvers before cutting out. I did this same maneuver often when a section threatened to stop me from getting down the line. It seems like everyone is doing this maneuver or something quite similar called a floater but back when not many guys did this.
One maneuver I never learned to do well is one I saw Booby Jones do in surf footage. I also saw a few other surfers do this same maneuver over the years. This is when you fall backwards off your board you keep your feet on the board and push yourself back up onto the board. I only managed this 2 time out of more than 20 attempts. Something about doing this was beyond my abilities probably related to leg strength.
I did manage to learn to surf switch foot although only did it in smaller surf. Now in my old age I am such a clutz and fall down immediately if I try.

So what is worse.... dying or regretting it for the rest of my life? Obviously I chose not regretting it.