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.
To block emails on iCloud, you'll need to use the iCloud website — you can't use the Mail app on your iPhone or iPad.