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.