I don't think its moss - its hard to tell what it is, but there's definitely a fungal element because I can see hyphae. It almost looks like eggs or mushroom spawn - if you've kept this material in the dark in a sealed container, that wouldn't be surprising, since there will have been mycorrhizae and other fungal elements already present in the composted material, just like in any handful of ordinary soil.
If you're concerned about it, scrape the top layer off before using it, otherwise, its fine to use on open ground (not in pots). In future, don't keep your compost from the heap in a tightly sealed container - its best left loosely covered or open to the elements, with drainage, so something with holes in the bottom, until you want to use it.
UPDATE: In response to the question contained in your comment: You can use compost you've made yourself in pots, but only if its been produced using a hot, aerobic method, that is, turning every few days and ensuring the temperature remains high enough to kill of pathogens. Most of us, though, just chuck stuff on the heap and turn it occasionally (or not at all), so the compost produced from that is not necessarily pathogen free. Using the latter type is a risk in pots, because its contained in there, pathogens and all, and these may affect any plants you want to grow in the pots; added to open ground, any pathogens won't be an issue in the same way, so its best used as a soil conditioner and a source of humus in beds and borders.