Ooh, a compost question, lovely!
This relates to those black plastic dalek-style composters, much loved by local councils, much hated by proper gardeners and people who, like me, are asked to empty the darned things.
Why the dislike? They are hard work, that's why. To make them work properly, ie to create compost in a reasonable time, you need to add material in thin layers, alternating soft green stuff and woodier brown stuff, with small amounts of grass only, and possibly handfuls of Garotta compost activator.
You also have to stir them - not an easy task, even with the special Helen Yemm-recommended stirring tool (a claw on a stick, with a T-bar handle at the top).
Getting at the compost is another major hurdle. Forget the idea of lifting the little lid at the bottom to access it: if you do that, you will shortly have a hollow cave with bone dry rock hard walls... no, the only way is to lift the whole thing up vertically, plop it down next door, then shovel the top two feet of disgusting squishy rotting stuff into it, before you get down to any decent compost
This is all time-consuming, and hard work... and one of my main principles is to get the best result from the least amount of work, not because I am lazy, but because I get paid by the minute, as it were, and I don't like wasting other people's money. Also, it's a good principle for the owners of the gardens: who wants to spend a precious free afternoon double digging, or something that you don't like doing? Gardens should be enjoyed, they should not be a duty.
Spending a lot of time and energy on compost is, in my view, the wrong way to do it: with just a little bit of forethought and organisation, you need hardly spend any time at all on it, other than the actual filling.
To avoid all of the above mentioned problems, all you need is a set of three pens, and they need only be a yard square each. And if you are about to object that you don't have room for three bins, just consider that your dalek takes up one yard, you will need the space to reposition it for emptying, so that's two yards: can you really not squeeze in a third yard? Even slightly less than a yard would work.
Once you have your three pens, here is the routine:-
1) Fill number one, keeping the top flat and level. Don't let it turn into a cone inside the pen - stuff the corners as well as piling it on the middle. When number one is full to overflowing, stop using it. Do not add anything more to number one.
2) Start to fill number two, as above. Leave number one alone, don't cover it, don't add any more to it, even though the level is shrinking.
3) When number two is full to overflowing, start to fill number three.
By now, number one should have sunk down to about a third full, and should be ready for use. Scrape off the top layer, which might be a bit weedy, and toss that material onto number three. You will know when the material is read to be used when you can't recognise anything within it. If you dig into it, and can see leaves, or stems, or worms, then it's not ready.
4) Use number one: spread on the garden, dig it in, use in pots, use as mulch. By the time number three is full, you should have used up all the stuff in number one, and you can start filling number one again.
You will note from the above that there is no stirring, no adding chemicals, no faffing about: no covering with carpets (yuk!), no extra time spent on them. Just pile it in, keep it level, let it get on with it while you get on with enjoying your garden.
However, if all you have is a dalek, then here is some detailed advice: don't add too much grass at any one time - thin layers only. And by "thin" I mean an inch or two, no more. If you find that you get too much grass at once, stack it in a box or a bag next to the dalek, and add a layer each time you add some other material to the dalek.
Likewise, don't put sheets of cardboard in the dalek: rip them up into small flakes. If it is the corrugated type, don't add it to the compost at all, as the glue they use to stick the layers together is often quite noxious.
Shredded paper is the same thing - little and often. If you only shred once a month, stuff it into a bag and add a bit each week.
Oh, and don't add egg-shells (they don't rot) or citrus peel (ditto) or meat in any form (attracts rats) or biodegradable/cornstarch bags: yes, I know they say they are meant for composting, but they are designed for large-scale commercial composting, not small domestic operations, which simply don't reach the temperatures required to disintegrate them.
Right, back to the question: Why are there worms inside the lid?
These are brandlings, they are the one and only composting worm: normal fat, pale earthworms do not live in compost heaps as it's too hot and would kill them.
Conversely, brandlings do not live in the soil out and about in the garden, it's too cold and would kill them.
So when you empty your compost out, don't fling the red worms out as well, put them back in the dalek.
Why are they inside the lid?
Answer - because it's too wet for them in the heap. Solution: add some dryer matter, such as stems or stalks, or a bagful of paper shreddings, or some flaked cardboard. They will soon work their way down again.
And, a frequently-asked associated question: Where do they come from? Should I buy them?
Answer - no, no, and thrice no! You don't need to buy brandlings, they just turn up of their own accord, unless your new compost heap is bone dry. I have no idea how they get there, how they know it's compostable material, or where they come from.
However, my Client quickly found that it got too heavy for her to turn it, so I would have to give it a good tumble every time I was there. Those shallow grooves are barely fingernail deep, so there's not much to grip when trying to turn it, and we found it got very wet and therefore heavy: also, the contents would be in one solid lump, so the first "tumble" each week was really hard going.
A further drawback was the number of flies it attracted, which was fairly horrible. The compost it made was not particularly good, and it was a beast to empty: you can see the "hatch" in the photo, it's quite small. About the only good design element was the flat stand underneath, which caught all the liquid draining from the compost. This compost "tea" we would drain off every so often into old squash bottles, then dilute and water onto the plants. Of course, we had no scientific way of establishing whether it really did the plants any good.... after a year or so, it was given away to a neighbour....