18 months after filing. If the applicant does not plan on filing in foreign countries, the applicant can opt out of the 18-month publication program. If the applicant has opted out, the application will only become public if the application issues (or the applicant changes position on foreign filing). (We've discussed that previously, here.)
What happens after publication. Whenever the information is published, that information can no longer be protected as a trade secret and will not be subject to an NDA. That doesn't necessarily make your NDA "null and void." If other nonpublished information has been included as part of the NDA, that should still be protected. For more on the subject, check out our NDA site.