There are a patchwork of state laws (reciprocity agreements, the "convenience rule", etc) and other caveats that don't make this universally true, but generally you pay taxes to (1) the state you you work in and (2) the state you live in. Note that #1 means the location where the work is being performed--not where the employer is located.
So if you commute interstate for your job, you'll sometimes find yourself filing income tax forms for multiple states.
I don't think that's the case. In my experience as a remote worker you always pay where you live, not where you work.