Light fixtures generally have two or three wires that are connected to the wall or ceiling to carry electricity through the light. Three wire fixtures often have a hot, neutral and ground wire, while two wire fixtures do not have the ground wire. The wires that make your light fixture work are the hot and neutral. The hot carries the electricity into the light while the neutral carries it out. In light fixtures, the electricity should flow into the fixture from the base of the lamp socket and out through the metal threads where the light bulb screws in.
Locate each wire that comes out of your light fixture. If one of them is bare copper or covered with green insulation, this is the ground wire. Bend it out of the way while searching for the hot wire.
If the two wires are white and black, the black is hot and the white is neutral. If the wires are red and black, the red is hot and the black is neutral. Red and black are usually reserved for direct current, rather than alternating current, which is used in households. So it's unlikely to find this colour combination in your home.
Look for plus (+) and minus (-) symbols on the wires. You may need a magnifying glass to do so, as the print stamped onto the wires is often very fine. A plus indicates the hot wire, while a minus indicates the neutral.
Look for texture on one wire. If the fixture is created with a standard type of lamp cord known as "zip cord," the hot side of the wire will often be ribbed, meaning it will have a vertical striped texture, while the neutral will be smooth. Run your thumbnail across the wires to feel for the texture, as some people find it hard to see.
Examine where the wires lead into the light fixture. If one leads into a switch inside the fixture, that is the hot wire. If there is no switch, follow the wires to their ends to see which one is fixed to the lamp socket base (hot) and which one connects to the socket threads (neutral). In fixtures that take light bulbs with prongs instead of screw bases, one hole is generally larger or deeper. This is the neutral side of the fixture. The wire attached to the other side of the base is hot. You may need a screwdriver to take apart the fixture to find where the wires lead. A flashlight is also helpful for seeing inside the fixture to the wire terminations.
Some light fixtures are not manufactured to rely on polarity. These often have two white wires. If you are in doubt, check with the light fixture's manufacturer.