Myositis affects the voluntary muscles, which are also called skeletal muscles.