Well, you have to use a WEP sniffer to get the WEP key off of the network. It basically consists of a program listening to the packets sent and received by the AP(access point) and then it can usually find the WEP key from the info contained in the packets. The higher the bit security(i.e. 128 Bit vs. 64 Bit) the more packets it has to listen to. (The longer it takes)
I probably shouldn't post any programs, but a google search will probably turn up all you need to know. Just go googlin'...
I normally do this to my and my client's Wi-Fi networks every now and then, just to test for security leaks.