Basically, 'the' refers to a collective group. You see this often when we're talking about animals, and in other cases. For example:
The cheetah is the fastest animal on land.
We don't say 'a' cheetah because we want to talk about all cheetahs.
I play the guitar.
We don't say 'a' guitar because I can play any guitar, not just one.
'play the fool' is a similar, but slight different case.
In ancient theater, 'the fool' was a character who mocked the royalty and academics by pretending to be stupid.
So, to 'play the fool' means to pretend not to know something when, in fact, you do. It can also simply mean to try and make people laugh by acting silly.
So, in that expression, 'the' refers to a specific, historical character, who was called 'the fool'.