Stars are classified based on their temperature, size, and luminosity. The most commonly used classification system is the spectral classification, which categorizes stars into different classes such as O, B, A, F, G, K, and M.