For a straight-through cable, the wires should go into the RJ-45 connector in the following order:

One EndThe Other End
Pin 1Orange/WhiteOrange/White
Pin 2OrangeOrange
Pin 3Green/WhiteGreen/White
Pin 4BlueBlue
Pin 5Blue/WhiteBlue/White
Pin 6GreenGreen
Pin 7Brown/WhiteBrown/White
Pin 8BrownBrown

Crossover wire order

For a crossover cable (which you use to connect two computers together without needing a hub), the wires should go into the RJ-45 connector in the following order:

One EndThe Other End
Pin 1Orange/White Green/White
Pin 2Orange Green
Pin 3Green/White Orange/White
Pin 4BlueBlue
Pin 5Blue/WhiteBlue/White
Pin 6GreenOrange
Pin 7Brown/WhiteBrown/White
Pin 8BrownBrown

To see what the wires shouls look like, both for straight-through and crossover cables, take a look at the graphics on this page. Thanks to Linksys for these handy diagrams.