You need a campaign committee for one, a budget, a platform, name recognition, funding and a good way to connect to voters to GOTV, get out the vote. Check with municipality on what paperwork, like nomination papers, need to be filed and when. Don't forget to do research on your opposition and have a good strategy to rebut any negative campaigning. Your private life will no linger be private, hope you and your family are ready for that. Research how much money was spent in prior mayoral elections and start now asking friends and family for campaign contributions. Figure out what organizations conduct endorsements and which ones come with financial and volunteer help. Good luck.
For you to campaign, you have to tell the people that you are running for mayoral candidacy. Create a budget for campaign and advertise yourself in things such as TVs, magazines, radios and even shirts. You have to make sure that you tell them what change you would bring if they vote you in. See http://www.ehow.com/how_8651357_run-local-election-campaign.html for reference.