Owe taxes in CT where I work, yet got money back from MA where I live.

Why do I owe? I thought I wasn't supposed to owe taxes for the state that I work in, just the state that I live in, so I don't understand why I owe money to CT when I live in MA.