As an H-2B participant, you're legally required to pay certain US taxes on what you earn on program.
Federal income tax
Your wages are subject to US federal income tax. Your employer withholds it from each paycheck.
Social Security and Medicare
Unlike J-1 and F-1 visa holders, H-2B workers pay Social Security and Medicare taxes (also called FICA). Your employer deducts these from your pay too.
State tax
Whether you owe state income tax depends on the state you work in. Some states don't tax wages at all.
Filing your tax return
Your filing status depends on how many days you spend in the US. If you're here for 183 days or more in a calendar year, you'll usually be treated as a US resident for tax purposes and file Form 1040. Otherwise, you'll usually file Form 1040-NR.
Your employer should give you a W-2 form to use when filing.
Tax treaties
If your home country has a tax treaty with the US, you may qualify for a partial or full exemption on some of your income.
This is a general overview, not tax advice. For guidance on your situation, talk to a qualified tax professional.