A joke made to emphasize any reference to sex that could possibly be extracted out of a sentence. Another variation is "that's what he said".
bob: "crap, its stuck and it wont come out!"
bill bob:" That's what he said."
bill: "Yeah, now you can just stick it in there."
billy joe: 'That's what she said."