If you do it wrong - nothing. As others have responded though, oxygen is the difference, and that is why you need to "turn" your compost every couple of days. If you don't, it will start to get very stinky - if you're doing aerobic composting shouldn't really have a smell, maybe something slightly earthy but that is it.