In most cases all you need to do is to turn in your I-94 or I-94W when you leave the US. If you are subject to NSEERS, then, yes, you will have to register before in person with either a CBP officer or in some cases at an automated machine. A lot of these rules depend on what country issued the passport and what type of visa you have, so write or call if you have further questions.
Answer Title: What is NSEERS?
Answer Link:
Answer
Thank you for contacting Customs and Border Protection's Customer Service Center. If you have any other questions or would like clarification on this response, please feel free to contact us either by calling our toll free number 877 CBP-5511 (227-5511) or if calling from outside the United States our toll number 703-526-4200 and speak with a Public Information Officer. Our hours of operation are Monday thru Friday from 8:30am-5:00pm Eastern Time.