First you need to install the JAGS program. You can download the installer from https://sourceforge.net/projects/mcmc-jags/files/.
Then install rjags R package. Within R, run install.packages ("rjags").
If this doesn't work, see the troubleshooting tips below. I'll try to add more advice as particular issues come up.