There are two standard procedures that are done to initially test for prostate cancer 1. a PSA blood test and 2. a DRE (digital rectal exam). These tests should be done annually, usually as part of the annual physical. If the PSA level is found to be high, then a prostate biopsy (NOT fun) and/or an MRI will be recommended. The biopsy is used to determine the Gleason score (1-10), which is a measure of how aggressive the cancer is.
Unfortunately, the official age recommendations for PSA testing (ages 55-70) are seriously out of date. Plenty of men both younger and older develop prostate cancer, and its important to test for it before it reaches stage 4 (treatable but incurable). Treatment is also easier the sooner the cancer is caught.
Men who are initially diagnosed with a Gleason score of 8-10 have almost invariably not had their PSA tested for several years - generally because of the official age recommendations. This is especially regrettable since PSA testing is cheap and easy.
The takeaway - ask your doctor for a PSA test at your annual physical or if you experience symptoms (usually urinary). Personally, Id insist on it (its not generally done unless you specifically ask for it).