I don't think that there were classes for that kind of thing back then. So how did people learn? Their parents? Did they just figure it out?
Log cabins tended to be a common form of dwelling in places where there were lots of trees, and if you were a homesteader in a wooded area then you'd need to cut down a bunch of trees in order to have a place for your cabin and whatever other buildings or structures you wanted to build. Then you'd need to chop down even more trees to clear land so you could plant crops. If you didn't have good enough skills with wood to build a rough, simple cabin before you started cutting down all those trees, you almost certainly would have by the end of the process.
And I wouldn't overthink it: lots of the original log cabins were pretty primitive structures. Maybe "shitty" would be a better word than "primitive". People picked up the finer points over time and improved on their cabins, but building a basic one-room, dirt floor, no-windows cabin out of rough logs and mud didn't take much skill.