A cold front occurs when a cold air mass advances and replaces a warm air mass, leading to potentially abrupt changes in weather conditions. Typically, as the cold air displaces the warm air, it can cause thunderstorms and a rapid drop in temperature. A warm front, on the other hand, forms when a warm air mass advances over a cold air mass. As the warm air gradually rises over the cold air, it often results in more gradual weather changes, bringing about cloudiness and precipitation, usually in the form of rain.