Spam auto-deletes in Gmail after 30 days — but it can be helpful to check the folder to make sure useful messages aren't slipping through the cracks.
The best way to change Gmail's spam settings is by manually sorting out your emails, but you can automate some tasks too.