Sulfasalazine is primarily used to treat inflammatory bowel diseases like ulcerative colitis and Crohn's disease. It also helps manage rheumatoid arthritis and sometimes psoriatic arthritis. This medication works by reducing inflammation, which helps relieve symptoms like pain, swelling, and digestive issues.