Did you know if you hold your ear up to a stranger’s leg, you can actually hear...
Did you know if you hold your ear up to a stranger’s leg, you can actually hear them say, “What the hell are you doing?”
This is a joke about acting weird, and about a false assumption on the part of the listener. When the listener hears the setup they will assume that the jokester is going to say something like "you can hear their heart beating", or "you can hear their bones creaking", or some other natural phenomena that you might be able to hear with your ear on someone.
The reason why you instead would hear them asking what you are doing is because sticking your ear on someone is a super weird thing to do, and it would almost certainly elicit comment on the part of the recipient.
If you want to tell this joke and get the maximum amount of laughs, I would guess that adding a pause in between the words "hear" and "them" would give the listeners time enough to parse the setup and guess where the joke is going.