Since there wasn't a specific thing you did to hurt your back and
since it also hurts at rest, it doesn't sound like a pulled muscle.
If you were coughing really hard, you could have pulled
something, but it would most likely only hurt with movement and
coughing, not at rest. On that note, I'm...