First, don’t panic. If you just realized you left it on, and you’re still home, walk into the kitchen. Check the stove. If there’s nothing burning, just turn it off. That’s it. You win this round.
If you smell smoke or see flames? Do not throw water on an electric stove fire—that can spread the fire or electrocute you. Grabbing a lid to smother the pan is your best bet. If it’s a grease fire, use baking soda or a fire extinguisher. Flour is not your friend here—it explodes.
If you’re already out of the house and realize you left it on? Call someone nearby to check. If no one can, and you’re worried, call the fire department. Better safe than a viral video of your apartment crumbling.