Why Did Angelina Jolie Have a Double Mastectomy?

Angelina Jolie has revealed that she underwent a double mastectomy to lower her risk of breast cancer. So what were the genes that increased her risk of developing cancer and was a double mastectomy the only option?