The "five ways" discovery was made by scientists who studied samples of healthy and cancerous tissue from more than 250 men.
Tumours were grouped into five distinct categories based on the activity of 100 different genes.
Each had a characteristic genetic fingerprint, the study showed. The analysis was better at spotting deadly cancers than tests currently used by doctors, including the PSA (Prostate Specific Antigen) blood marker and Gleason score aggressiveness rating.
Lead researcher Dr Alastair Lamb, from the Cancer Research UK Cambridge Institute, said: "Our exciting results show that prostate cancer can be classified into five genetically-different types. These findings could help doctors decide on the best course of treatment for each individual patient, based on the characteristics of their tumour.