What does the idiom pull your leg?

When someone tells you something you believe, but they are actually kidding, they are pulling your leg.