That sounds like Lemmings — the puzzle classic where you herd small creatures across hazardous levels by assigning each one a skill such as digging, building or floating.
If it was not Lemmings, a few similar titles fit the description, so any extra detail about the art style would narrow it down.