The brakes will let you know.
There are wear indicators on the brake pads. These are little metal tabs on the brake pads that will contact the rotors when the pads need to be replaced.
These wear indicators will make noise when you apply the brakes. It sounds like squeaking chalk on a chalk board.
There is no mileage point where you change your brakes. Brakes will wear differently depending on driving conditions and driving style. Cars driven in the city will wear the brake pads out faster than cars driven mostly on the highway. If you are an aggressive driver you will wear your brake pads out faster than a normal driver.
The quality of the replacement brake pads can also make a big difference.
I change my own brake pads. I thought I was saving money by using cheap brake pads. However I found myself changing the pads every 20,000 miles or so. I have started using more expensive pads and now I get about 50,000 miles or so from the pads. With brake pads, you get what you pay for, so go with better pads.