Company in a different state

Hello

I live in PA and work remotely from home as a consultant for a company out of NC.  They are taking NC state taxes out of my paychecks.  Am I required to pay PA and NC taxes or how does that work?

Thanks