A cold front is formed when a cold air mass pushes into and under a warm air mass, forcing the warm air to rise.