The sugar phosphate backbones of the DNA molecule run in opposite directions. Each strand has two ends; let's take one of those.
At one end there is a 5'-OH group, where a free phosphate group is attached. And at the opposite end is a 3'-OH group, which is where a free hydroxyl group is attached.

click to enlarge
The DNA molecule is structured in such a way that there can never be two 5' (so called "five prime") or two 3' ("three prime") at the same end of the molecule. So the two strands of the molecule are upside down in relation to each other.
So, imagine the DNA molecule as a ladder, and if you look at the supports separating the rungs. The top of one of those supports will be 5' and the top of the other will be 3'. Then scoot your eyes down to the bottom of the structure and you'll see that the strand with a 5' top has a 3' bottom, and the strand with a 3' top has a 5' bottom.