Get your taxes done using TurboTax

If I filed both federal and state together  and federal owes me but I owe the state, and the amount that federal owes me  is higher then what I had to pay Turbotax to do my taxes plus what is owned to the state is still a lower amount combined, does state take what is owned from the federal amount or my bank account provided? And does turbotax aswell?