Anything powered by electricity requires that the current make a full circuit to and from the main box. So all the wiring in a house has two lines: one that brings in the electricity (the hot wire) and one that carries it back (the neutral wire). Connect hot wires to each other and neutrals to each other. And just make sure you don't become the conduit in between.
The hot is usually black and the neutral white. But if yours look different, use a circuit tester. With the electricity on, touch one node of the tester to the wire and the other to something metal—that is NOT touching you. If the light goes on, that's your hot wire.
Turn off the electricity and connect the black ("hot") wire to the black wire or the brass screw on your fixture and the white (neutral) to white wire or silver screw. If your fixture has two like-colored wires, the grooved one always goes to the neutral connection. Be sure to connect the copper grounding wire from the cable to the green grounding screw in the junction box, then to the grounding wire coming from the fixture, if there is one.
Learn more about putting up a weighty light fixture at Hanging a Chandelier