H4 to H1 Visa - Taxation rules

My spouse currently lives in US with H4 visa. I am planing to apply H1 next year for her in april through some consultancy. I know there are lot of hurdles in that. But once we pass through, she will effectively eligible to work from Oct. My question is, if she doesn’t get the job applied for H1 visa, do we still need to pay taxes for IRS. Or the Tax is applicable only when you earn an income.?

Please point me on some threads if this info is already available. Thanks!!