Gelatine is made by boiling the skin, bones or connective tissue of animals, and it is used in sweets, marshmallows, yoghurts, desserts and medicine capsules. A large share of it comes from pigs or from cattle that were not slaughtered in the Islamic way, which is why the label matters. The Quran forbids the flesh of swine, calling it foul, and also carrion, blood and what was dedicated to other than Allah.
Scholars have two views on pork-derived gelatine. Some accept it because the raw material is completely changed by processing, a principle called istihala (transformation), which they compare to wine becoming vinegar. Others hold that bones and skin of the pig remain forbidden in essence, and that chemical treatment is not a natural change. Because of this disagreement, the careful course for most Muslims is to avoid gelatine of unknown or pig origin.
In practice, look for a halal certificate, or choose products marked vegetarian or made with agar, pectin or carrageenan, or with fish gelatine. The Prophet ﷺ taught that the lawful is clear and the unlawful is clear, and that between them are doubtful matters, and whoever avoids them has protected his religion and his honour. Where you have no way of knowing, leave the doubtful item for a clear alternative.