The major histocompatibility complex (MHC) is a set of cell surface proteins essential for the immune system to recognize foreign molecules. MHC molecules play a critical role in antigen presentation, allowing T cells to identify and respond to pathogens. They also determine compatibility between donors and recipients in organ transplantation, highlighting their significance in both immune recognition and graft rejection.