Surprisingly, there is actually a wiki page on the matter:
Wikipedia.org - Taking the Piss
Roughly covers the following:
1
- mocking someone
- making a joke at someone’s expense
2
- saying/doing something unbelievable
- doing something unfair
- taking more than your fair share
“Are you taking the piss?” is pretty similar to “You’ve got to be joking, mate!” or “are you fucking kidding me!?!”
Tweak@feddit.uk 5 hours ago
It is “the” lol. Taking a piss means going to the toilet, taking the piss is taking the mick, ie behaving with a mocking disregard for others.
Wrt loafing around, you might be taking the piss if you’re not doing something, eg your household chores. It’s not the laying around that takes the piss, it’s that you’re not doing what you’re supposed to do. It takes the piss out of others when they have to pick up the slack for you.
Like a lot of British phrases, there’s some flexibility in its usage.
HubertManne@piefed.social 5 hours ago
ok. I think im starting to understand the variety of ways I have seen it used on tv. This I think is the best explanation yet especially with the take the piss out of others. like that phrasing fits it better in my head.