I have a iMac late 2009-2011 ...
The exact model designation is relevant. Mid 2010 iMac and later models can use OS X Internet Recovery. Earlier models cannot.
If your iMac is too old to use Internet Recovery you need to boot from some other device—a bootable (USB, for example) installer or NetBoot.
How to create a bootable installer for macOS
Create a NetBoot, NetInstall, or NetRestore volume
Of course both of those options require another Mac.
The simplest way to determine if that iMac can use Internet Recovery is to try it. If it doesn't work and you don't have another Mac then you need that iMac's original, grey, Mac OS X Install DVD that shipped with mid-2011 and earlier models, and needs to accompany it from cradle to grave.
If you lost that DVD, then you need to obtain a retail, white, Snow Leopard Install DVD.
Apple no longer sells them but legitimate aftermarket sources exist. They are not cheap.