You can get books that teach all the basics, for example there is one called Wiring A House that is pretty good. Then you can usually contact your local building department for the city where you live to get specific questions answered. Unless you live in a place like Chicago where all wiring needs to be in conduit and then that’s a whole different story.
Usually visiting your place of local government / library and asking for a copy of local building codes will get you a hard copy at not much more than cost to photocopy.
These typically reference model codes that are often proprietary. You may still be able to get them from a library but if your question is along the lines of "how many receptacles can I put on one circuit" you need to look in something like the International Residential Code[1], not in your city/state statutes.