As Karl points out, first find the hot (source) wire. On a standard three way switch, this is usually attached to the screw on the side of the switch that only has one screw. The screw on the switch is usually a darker color too. There will be one of these on each switch obviously, so there are really only two wires to test. Use a multimeter by touching the wire, and the other lead from the multimeter to the white (in the US) or to ground.
Once you find the hot, the wire attached to the other switch on the side with the single screw is probably the one that goes to your lights.
The other two wires should be attached to both switches, and these are called the travelers. They let the power move from one switch to the other switch, and alternate sending power based which way the switch is positions. So one of these is always hot.