When diagnosed with testicular cancer, they will remove the cancerous testicle through a surgery called an Inguinal Orchiectomy:

Inguinal orchiectomy: A procedure to remove the entire testicle through an incision in the groin. A tissue sample from the testicle is then viewed under a microscope to check for cancer cells. (The surgeon does not cut through the scrotum into the testicle to remove a sample of tissue for biopsy, because if cancer is present, this procedure could cause it to spread into the scrotum and lymph nodes. It's important to choose a surgeon who has experience with this kind of surgery.) If cancer is found, the cell type (seminoma or non seminoma) is determined in order to help plan treatment. [1]

Can I get prosthetic/implant after surgery? 

Artificial and prosthetic testicle implants are available. The prosthetic testicle is implanted in the scrotum and has a similar weight and texture to that of a normal testicle. Some men have expressed that a prosthetic testicle is uncomfortable, and many opt to not have one. As each individual is different, we encourage talking with your doctor about the the options, risks, and best timing when considering a prosthetic/implant.

Source: http://www.cancer.gov