The IRPF (Spain's personal income tax) taxes the income earned during the year by individuals who are tax residents in Spain. It's a progressive tax: the higher the taxable base, the higher the marginal rate applied.
Brackets and rates
There's a national portion and a regional portion of the IRPF, so the effective rate can vary depending on the autonomous community (or historical territory, in the case of the Basque Country and Navarre, which have their own regional/foral rules).
Withholdings vs. final tax bill
What your employer withholds each month from your payslip is an advance payment toward the IRPF, not the final tax. The final amount owed is calculated in the annual tax return, where withholdings, deductions, and other income (rentals, investments, etc.) are reconciled.