Everything said so far is true.
When I was learning to make instruments, I looked at the various ways necks are attached. For solid body electrics, a bolt on neck is fine, though not very esthetically pleasing to my way of thinking.
In an acoustic or acoustic electric, a bolt on neck is still an option - though it isn't visible in that case. Glued necks are done in several ways, and one is to butt the neck up to the body of the guitar and attach it with glue and three or four bolts from the inside of the body. This is a very solid attachment method.
They can also be cut with a key and slot, so the end of the neck - shaped like a dovetail -
slides into a V shaped slot in the neck block, and is of course glued. This is also solid. The advantage to these kinds of neck attachment is that the neck can actually be removed in the future if necessary. I've done it, and it's not too difficult to remove, repair, and replace the neck.
Sometimes the two methods (bolt and dove-tail) are combined, but it's rare.
These are the methods most often used in steel string acoustic guitars. The bolt on is more popular with factory made guitars because it lends itself to mass production. The dovetail design is usually the preferred method in hand made guitars.
The method I prefer, and use myself, is to make the neck with an integral block that has slots in the sides. When assembling the instrument the sides go into the slots, the top of the block is glued to the soundboard, and the bottom of the block is glued to the back. You can't take this apart without disassembling (read destroying) the entire instrument. The reasons I prefer this method:
- The instrument is rock solid. The neck will never move or come loose.
- The neck is perfectly aligned with the body in all three axis.
- It's relatively easy to get it right.
This is the method most often used in hand made classical guitars.