An NDA is a contract that outlines the terms of an agreement between two or more parties that want to share information while not sharing the information with the public or third parties. It also protects any proprietary information.
The major reason someone would use an NDA is to protect intellectual property. If a company is sharing sensitive information about their new product with another company, the other company might misuse the information and create a similar product. By sharing the information under an NDA, the company ensures their ideas remain their own.
Companies will often sign an NDA with a company if they are in discussions about a potential acquisition. An NDA protects both companies from spreading confidential information about what the companies are discussing.