To obtain a legal name change in New Hampshire, an applicant must submit a petition to the court. Subject to the court's discretion there may be a publication requirement, but generally no publication is required. (N.H. Rev. Stat. Ann. §§ 547:3-i & 550:4) The court petition for a name change form is online here.
For instructions on legal name changes for minors under 18 in New Hampshire, see NCTE's Name Changes for Minors in New Hampshire resource.