Reliability is defined as the ability of a product to perform as expected over time, and is formally defined as the probability that a product performs its intended function for a stated period of time under specified operating conditions. Maintainability is the probability that a system or product can be retained in or restored to operating condition within a specified time. There are two types of failures - functional failures that occur early due to defects, and reliability failures that occur after some period of use. Reliability can be inherent in a product's design or achieved based on observed performance. Reliability is measured through metrics like failure rate, mean time to failure, and mean time between failures.