What is the mechanism behind class comments?
The class comments are Annotations : 
What is Annotation mean ?


In general according to techopedia.com


  Annotation is a term used in computer programming to refer to documentation and comments that may be found on code logic. Annotation is typically ignored once the code is executed or compiled.

In Drupal According to Annotations doc page:


  Annotations for class discovery and metadata description.
  The Drupal plugin system has a set of reusable components that developers can use, override, and extend in their modules. Most of the plugins use annotations, which let classes register themselves as plugins and describe their metadata. (Annotations can also be used for other purposes, though at the moment, Drupal only uses them for the plugin system.)



A lot of frameworks use annotations too like symfony use it in many contexts like creating routes using annotations here.

For the annotation example you put in your question is for QueueWorker plugin:

cron = {"time" = 60}


the definition of cron property QueueWorker::$cron according to QueueWorker::$cron it mean:


  time: (optional) How much time Drupal cron should spend on calling this worker in seconds. Defaults to 15.