BRCA1 and BRCA2 are genes that code for proteins that repair DNA, so if one of these is defective, DNA is not repaired properly, increasing the number of mutations in the DNA, which is the cause of cancer.
As is mentioned in the question one copy is inherited by each parent, so when one of the parents is a carrier the offspring has a 50% chance to inherit the mutation, now the fact that someone inherits a defective copy does not imply that necessarily will develop cancer however their chances increase, for example, a woman with a defective copy will have 55% to 72% chances to develop cancer meanwhile a woman with both healthy copies has 13% chances.