The blob starts in the top-left corner. Pick a colour, the blob becomes it and swallows everything of that colour it is touching. Turn the whole board one colour before the moves run out.
Your blob is the top-left square and everything of its colour joined to it. It is drawn as one solid shape — the rest of the board keeps its grid lines, so you can always see where you end.
Tap a colour below the board. Everything of that colour already touching your blob joins it — and whatever that newly reaches joins too, in one go.
Every board was solved before it shipped, and the count you are given is the length of a solution that is known to exist. If it says four moves are left, four are genuinely enough.
It is not the shortest possible, though — so finishing with moves to spare is something you can really do, and that is what the stars are for.