Navigation lights must be used if you are operating the boat from sunset to sunrise, and should also be used during the day if visibility is poor. Number and position of lights you have to have depends on boat size, but in general you will have port (red) and starboard (green) lights, a mast head light (seen from in front of you) and a stern light (seen from behind). Each of the lights has a specific 'arc of visibility', meaning it depends on someone's orientation to the direction your boat is heading as to which lights they can see.
With the regs on placement and arc of visibility, someone can get idea of what kind of boat they are looking at and which direction it is heading, based on based on what lights are visible.
If you anchor the boat between sunset and sunrise, you must display a different lighting pattern - a 360degree white light must be visible at all times. Again, this tells people what's going on.
The US Power and Sail Squadron probably has chapter near you (
http://www.usps.org/), and will offer basic training in things like boat handling and safety on the water, including lighting requirements, required safety gear and how to use it, handling lines properly, safe and secure anchoring, marine communications (VHF radio), basic navigation and reading of charts, etc.....
You should check them out.