Joanap itself is fairly complicated, with infections being started by an SMB worm, which then installs the Joanap RAT (Remote Access Trojan). Command and control is done via a peer-to-peer distributed network.
Which is where the FBI comes in. A court in the US granted them permission to set up fake servers pretending to be controllers on Joanap. As such, they could spy on individual machines, collect information, or even install software (possibly to remove the infections and patch vulnerabilities).