You can only earn 1 chest per champ per season, and you can only earn one of those when you have a chest available to be earned (up to a max of 4 at once), which is what the time until next chest thing signifies.
You can earn the S ranks in any mode, so ARAM or SR or whatever else all count. If someone in your premade earns an S rank, you'll also get the chest for the champion you're currently using provided you haven't already earned your chest for that champ during this season.
This does assume you're eligible for loot though, if you've been punished recently you're locked out of getting chests until you demonstrate to the system that you've reformed.