I had a class in high school that mostly covered the basics, though I wouldn't say I "learned" it. It wasn't until around 15+ years later and after I started working as a programmer and decided to work through a Programming A Chess Engine In C [1] youtube series that it finally really clicked.
[1]https://www.youtube.com/watch?v=bGAfaepBco4&list=PLZ1QII7yud...