you'll need an nie to open a bank account. the banks give a summary of your account to the tax authorities via your nie number - ie interest earned, mortgage paid, that sort of thing. yourself or your employer also provide information about your earnings. you only pay a nominal amount of tax every month via your salary.
the tax year is the calendar year and all the info for the previous year has to be received by march/april. the tax people calculate how much you owe or are owed and you pay this via the bank.
the tax limit is quite high in spain so i've never ever paid tax. this year i've got a rebate of 5 cents. i can choose to receive this, give it to the church, or leave it with the tax authorities. as it will cost me about 3 euros on the phone to choose any option, i've decided to keep schtum.