I will assume you are referring to Polonius (and Claudius) who are hiding behind the arras during Ophelia and Hamlet's conversation in Act 3.
Hamlet has been acting crazy lately, and in an effort to try to prove the cause of Hamlet's lunacy is the rejected love of Ophelia, Polonius and Claudius use Ophelia as a "set-up" for Hamlet. Hamlet, in an effort to maintain the pretense of madness, is brash and rude to Ophelia. He tells her to get herself to a nunnery in order to stay away from men; he tells he never loved her; he says that all men are "arrant knaves" and not to be trusted. The next line is the key to your question. He rather abruptly stops his ranting and asks Ophelia, "Where's your father?" Her response is"At home, my Lord." Hamlet's next line suggests that he doesn't believe her, for he seems to almost talking to Polonius himself when he declares, "Let the doors be shut upon him, that he may play the fool nowhere but in's own house." In other words, he is insulting Polonius, calling him a fool and then saying that the only place he can play those games is in his OWN house, because here in Hamlet's house (Elsinore castle) he isn't going to get away that kind of thing. Hamlet is onto him and won't reveal anything to the spies behind the curtains.