An induction cooktop is simply an electromagnet you can cook with. Inside the glass cooktop, there’s an electronically controlled coil of metal. When you turn on the power, you make a current flow through the coil and it produces a magnetic field all around it and (most importantly) directly above it. it generates a constantly changing magnetic field. It does not generate heat directly. You can put your hand on top of it and you won’t feel a thing. (Warning: Don’t ever put your hand on a cooktop that has recently been used for cooking because it may have become dangerously hot from the cooking pan that’s been standing on top of it.)
When you stand a suitable cooking pan on top of an induction cooktop that’s powered up, the magnetic field produced by the cooktop penetrates the metal of the pan. So we have a fluctuating magnetic field moving around inside a piece of metal (the base and sides of the pan)—and that makes an electric current flow through the pan too (that’s all that induction means). Now this is not quite the same as the electric current that flows through a wire, carrying electrical energy in a straight line from (say) a battery to a flashlight bulb. It’s a kind of whirling, swirling electric current with lots of energy but nowhere to go; we call it an eddy current. As it swirls around inside the metal’s crystalline structure, it dissipates its energy. So the metal pan gets hot and heats up whatever food is inside it, first by conduction (it passes its heat energy directly to the food) but also by convection (liquid food rises and falls in the pan carrying heat with it).