A Threat and Risk Assessment analyzes a software system for vulnerabilities, examines potential threats associated with those vulnerabilities, and evaluates the resulting security risks.
A vulnerability is any “flaw or weakness in system security procedures, design, implementation, or internal controls that could be exercised (accidentally triggered or intentionally exploited) and result in a security breach or a violation of the system's security policy” (NIST SP800-30 Risk Management Guide for Information Technology Systems).
The level of threat is determined from the potential for any natural, human or environmental source to trigger or exploit any identified vulnerability.
The risk assessment looks at both the probability of that threat occurring, and the impact on both system and organization should it occur.
An appropriate strategy can then be formulated for each risk depending on severity (such as acceptance of the risk, adoption of a mitigation plan, or implementation of an avoidance strategy).