Yogurt even if it's sealed needs to be refrigerated to keep safe to eat because when you leave even sealed Yogurt out a room temperature it will only last around 2 hours before it goes bad and needs thrown out.
So when you buy Yogurt put it in an Ice Chest or get the Yogurt home and put it into the refrigerator as soon as you get home and don't leave the Yogurt out longer than a couple hours otherwise it becomes bad and unsafe to eat.
Always refrigerate Yogurt when not eating it and you can also freeze Yogurt to keep it longer.