Myositis is an inflammatory condition affecting the muscles that causes weakness, pain, and swelling. It can occur as an autoimmune disorder or in response to infection, injury, or other underlying conditions.