Either way, the figure inside the capsule will be random. Normal Figures are the most common: you can earn these by either finding capsules throughout the game's stages, or by using the appropriate Gotcha Machine in Waddle Dee Town.
See How to Unlock Everything for a list of tasks you must do.
First, a breakdown on how this mechanic works: This section of the page explains how the Gotcha Figure Collection works in Kirby and the Forgotten Land, with tips on how to complete your collection.