Taxable income = Total income - Standard deduction
Look up tax due in a table.
Subtract taxes already witheld, pay (or refund) the difference.
In most states you also have to file, but this is normally just transcribing a few totals from your federal filing and then computing the state tax due, normally just a simple percentage multiple.