Calories in vs out

Is that how it really works? Sounds silly, I fit under my calorie goal today but indulged a fair amount and feeling absolutely stuffed, wondering if because I've eaten such unhealthy food it'll hit me tomorrow!