My attorney's fees

Will I have to pay all my attorney's fees and will I have to pay some of my spouse's as well? if the court finds out that you have the ability to pay...