Yes, New Hampshire allows you to register and vote at your polling place on Election Day. Your must provide proof of citizenship, age, and residency to register.
You also need to show a photo ID that is accepted for voting.
Otherwise, the deadline to register is 6-13 days before Election Day (check with your local clerk).