What prevents someone from pleading the Fifth Amendment, even if they don't necessarily have something that would incriminate themselves if they answered?
Immunity. Sometimes prosecutors offer immunity to a witness in exchange for testimony against another defendant. In such cases, the witness cannot claim protection under the fifth amendment because the witness's testimony can no longer incriminate the witness.
Does the opposition have to prove that nothing they say could incriminate themselves to remove the protection?
No. Proving a negative proposition is generally impossible.
Does the witness have to reveal something to the judge to enforce the protection?
No, because such a revelation would also tend to incriminate the witness.
Additionally, who knows what random law they might have broken, and might admit to if they testify? Can someone plead the fifth on those grounds?
Yes. It is not in fact necessary to cite specific grounds for invoking the fifth amendment, because forcing a witness to cite a reason would itself be tantamount to forcing the witness to incriminate him- or herself.
Truthful statements by an innocent person
An incriminating statement includes any statement that tends to increase the danger that the person making the statement will be accused, charged or prosecuted – even if the statement is true, and even if the person is innocent of any crime. Thus, even a person who is innocent of any crime who testifies truthfully can be incriminated by that testimony. The United States Supreme Court has stated that the Fifth Amendment privilege:
protects the innocent as well as the guilty.... one of the Fifth Amendment’s basic functions . . . is to protect innocent men . . . who otherwise might be ensnared by ambiguous circumstances..... truthful responses of an innocent witness, as well as those of a wrongdoer, may provide the government with incriminating evidence from the speaker’s own mouth.
(Ohio v. Reiner, 532 U.S. 17 (2001) (per curiam))
The U.S. Supreme Court has also stated:
Too many, even those who should be better advised, view this privilege as a shelter for wrongdoers. They too readily assume that those who invoke it are either guilty of crime or commit perjury in claiming the privilege.
(Ullmann v. United States, 350 U.S. 422, 426 (1956) (footnote omitted))