Research the city's requirements for mayoral candidacy. Look for a charter outlining the specifics particular to your city.
Get a petition started to get your name on the ballot for mayor. Get as many signatures as possible for the petition to be valid, as most cities require a large number of signatures for a candidate to be included on the ballot. Collect the signatures within the date required to get onto the ballot.
Get the party of your choice behind you in order to get the most recognition and signatures. Attend party meetings and introduce yourself to the leading party members. Attempt to get the local party to nominate you as the party's mayoral candidate.
Fund your campaign with your party's contributions and contributions from the community. Get funding by soliciting the support of local companies and individuals. Seek donations by sending out petitions and requests for campaign support.
Put together a group of campaign supports who can help you with signage and other advertising. Use road signs, billboards and perhaps going door to door if necessary. Make as many appearances as possible in order to get acquainted with locals. Meet community leaders and attempt to get their endorsement. Give interviews to the local newspaper and attempt to solicit their endorsement too.