State tax filing

That doesnt make any sense.  Why would both NJ and PA double tax me for wages earned in PA?  On my W2 I only have NJ listed as my state.  Also how can I file a resident tax return for PA and a Non resident return for PA?