Should I do anything if I am cited for something that wasn't in my paper?
Since you never mention their technique, it is quite likely it's a "typo" (they accidentally cited a different paper than they meant, which, at least, in my field happens more than 0% of the time), or they just misunderstood your paper (or you misunderstood your paper). I agree with @aeismail that there's nothing you need to do, but if you want to get to the bottom of this, you could contact the authors, saying something like:
I noticed you cited my paper in ... about X. However, that paper didn't consider X. Did you mean to refer to another paper? If so, I'd be interested in knowing which paper.
There really isn't any action worth pursuing here. You could write the editors and ask them to issue a corrigendum stating that the reference was incorrect, but you'll probably waste a lot of time and effort for what is likely a very minor issue.
Yes, you should write the authors.
I disagree with both @aeismail and @Kimball, in that I believe it is important to address the incorrect reference, and you should go to at least some effort to do it. Since it's not a critical reference in the paper OP mentioned, I would not do much, but we should be striving for published research to be absolutely correct on the facts (as opposed to opinions/perspectives/etc) so as not to confuse future readers.
So, a minimum of something like this (the wording is just a suggestion of course):
I've recently read your paper
Their paper
.Say something nice about their paper so as not to appear too hostile
. I've also noticed the paper quotes own my work inYour paper
regarding technique X. However, that paper of mine does not actually discuss technique X nor use it. Did you intend to refer to another paper (e.g.Some other paper which might be more appropriate
)? Regardless, I'd like to ask you to consider taking some action to address this issue (perhaps by contactingThe Journal
), to ensure readers are not confused by the reference.
would be in order. Be respectful in addressing them.