Juvenile idiopathic arthritis (JIA) is an autoimmune disease that occurs in children when their immune system malfunctions and attacks healthy joints, leading to inflammation and joint damage.