Where does it comes from "pull the other leg, it's got bells on"?
"Pulling one's leg" is an idiom which means teasing, or joking with someone, specifically by telling them something that is not true. You might reveal to someone that you were kidding about something by saying "I was only pulling your leg".
The phrase "pull the other one, it's got bells on" is said by people when they recognise that someone is joking with them. The inference is that they should pull the other leg, because it has bells attached to it and will make a jangling sound.
The origins of "pulling one's leg" are unconfirmed and there are a number of possible origin stories but according to the cited article it appeared in print at least as early as 1883.
The idea of a leg having bells attached is a reference to either Morris Dancing, or more likely medieval jesters, who attach bells to their ankles as part of their act.