I live in NJ but work in NY, should I be paying taxes from my pay to both states on every paycheck? I do not want to be double tax.

My company does not have a clue on what to, and right now I am only paying to NJ,  I do not want to owe a lot to NY when I file my taxes.