Creature spells fall under either Spellcasting or Innate Spellcasting.
These abilities reference to and are thus clearly linked to spells, which means they can be counter spelled due to the use of the word Spellcasting in their functionality.
An example of a creature with the SPELL CASTING trait would be a Lizardfolk Shaman. This creature can be found in the MM pg. 205.
An example of a creature with the INNATE SPELLCASTING trait (spell like abilities) would be an Ice Mephit in the MM pg. 215; or a Glabrezu in the MM pg. 58. Innate spellcasting functions differently in that it isn't limited to spell slots, and doesn't cost material components. So it's a spell-like ability, but can be counter spelled.
An example of a creature ability that is not a spell but seems like one is the Succubus/Incubus in the MM pg. 285. The abilities these creatures have don't fall under spells, meaning you can't Counterspell a Succubus Charm ability. This action is an ability much like a Barbarians Rage or a Druid's Wildshape.
And specifically, a Beholder does not use either Spellcasting or Innate Spellcasting, meaning it's eye stalk death beams of glorious carnage are an awesome, awesome, ability.