What should I say about a publication that I have not contributed to? I am currently an undergraduate student and I am applying for research Masters/PhD in the US. I joined a research group before to help out on a part of a project. My coworker in this group, a PhD student has published a paper afterwards, which is irrelevant to the work that I have done, but since I have worked in his group, I was added to the co-author in his paper. I did not ask for it, but anyway, I have the publication, and I have to mention it in my application.

My fear is that, if, during the interview, I was asked about the publication, should I just say that I did not contribute to it? I do not want to lie anyway, but would that hurt my previous research group since they have added irrelevant people to the paper?

I do not think it is uncommon to have a coauthor that is not relevant to a project in my country. However, I am a bit afraid if they would take it seriously in the US.
Cut shortly, use it to your advantage, but be honest. If you're in the project, that means you should know the aims, tasks and problems of it. Even if you did not contribute to the article directly, experimental or literature research is still relevant and could be used by your colleagues. Try to figure out to see it clearly and be able to explain.
And of course if you include this publication to your CV, you should know as much as possible about the topic. That could be educational for you as an undergraduate.
Good luck!