I think that when I registered in Gemeinde Zurich I declared my religion as "Catholic" because I was indeed baptized at birth.
That was before knowing I have to pay taxes, which I strongly disagree with, as I'm an atheist and I abhor, especially the roman catholic church above all.
Now it looks, I have to send a letter to my closest church (?never been to any church since 10 y.o.) to "de-register".
If it was recent (just a few days or perhaps weeks) then perhaps you could ask the municipality, where you registered, to correct it.
If it's been longer than that, then, yes, as kri said, write the letter to the church. When you get the confirmation, send a copy the municipality (and/or the tax office), and possibly to your employer if they are deducting your tax from your salary.
Well the data is not wrong, it's what you gave them, so it would probable by a bad start to suggest to them that it was.... Go there apologise profusely and play the dumb foreigner card and hope they'll change it for you.
If not then you'll need to go through the process of exiting the church and delivering the documentation to have it changed although I doubt it will be retroactive in such circumstance.
You will most likely have to show that you have been excommunicated, which will mean you will be excommunicated. The church will insist on it. So. Are you an atheist, or are you a non-observant catholic. Only you know.
Basically, a simple letter (with your personal data [name, address, birthdate and location]) is enough. But to make sure you can prove the date of receipt it's recommended to send it with registered mail. Less expensive options may do the job nowadays, too, not sure, lacking certainty I'd go with the standard option for ~6 CHF; perhaps someone can shed some light on this.
It's possible that some communes require some form of an interview or other form of delay. Nonetheless the date they receive your letter is when the duty to pay tax stops, that's what's meant with the retroactive effectiveness.
Where to send to? You should receive a periodical called "Pfarrblatt" if you didn't opt out, that should provide an address. Otherwise see their map on the website . In case all else fails they say
Katholische Kirche im Kanton Zürich
Hirschengraben 66
8001 Zürich
is appropriate for all church communes and issues in the Kanton.
Church resignation when viewed under catholic dogmatics
From a dogmatic point of view, a baptised person will remain a catholic for the rest of his life. "In every case it is clear that the sacramental membership tie to Christ's body, who is the church, is an enduring ontological tie because of the baptism, and it does not expire because of a factual resignation". (Quotation of Pope Benedict 's XVI letter to the papal council on legal texts dated 13 March 2006 on the subject of the formal church resignation).
Partial church resignation
In 2007 the Federal Court decided that it must be permissible to resign from the catholic church while at the same time retaining the catholic confession. BGer 16.11.2007 2P.321/2006