I usually wash out the worst with washing up liquid, soak in Vanish and then put through the washing machine. I must say, the Vanish stuff is very good - didn't have this with the previous two children.
Repeated washing and sun are also good too, and I'd definitely agree that the sooner you treat the stain the more chance it has of coming out!!!