The container which contains compost should have openings for proper aeration. The process of composting is an aerobic decomposition process. If the compost doesn't get enough air a anaerobic decomposition process might happen which is rotting.
Also for a compost pile to properly decompose it needs to be moist for the micro-organisms which do the composting to decompose the pile. This means that in dry weather watering may be needed. Although water is needed too much of it may get rid of oxygen in the pile letting unwanted anaerobic decomposition to happen.