The testicles or testes (aka "balls") are the two glandular organs possessed by males to manufacture sperm. They are located inside the scrotum under a layer of skin, fascia, and thin muscle, and are attached to the body by the spermatic cords (see the scrotum entry for more general anatomical reference). These spermatic cords contain both several veins and arteries to keep the testicles supplied with blood (see elastration to find out what happens if those are obstructed), nerves, and the ducti deferens which allow sperm to move from the testicles to the prostate (and then out the urethra) — the ductus deferens (and only the ductus deferens) is what is severed during a vasectomy. Muscular action inside the ductus deferens also helps during ejaculation.
The testicles themselves are sheathed in several layers of fibrous tunica (tunica albicans), and are attached to the spermatic cords by the epididymis (the tightly coiled tubes on the top/back of the testes). The testes sit under this, almost as a head. They are full of seminiferous tubules which are lined with the cells that actually produce the sperm.
Permanent testicle piercings are not an option! Due to the anatomy of the testicle it is simply not possible to heal such a wound with jewelry in place, and attempting to do so could easily result in involuntary castration when serious infection sets in. People have tried and it just doesn't work. So please don't put yourself at needless risk and discomfort. Testicle skewering and other play piercing of the testicles and surrounding tissues is possible, but note that these practices are not without their own set of risks.