Understanding flyback diodes in an H-Bridge
However, I could not understand how those diodes are acting as flyback
  diodes in this configuration and also why we don't need them while
  using MOSFETs but do need while using a darlington pair for example.


Most MOSFETs, by their configuration of bulk-connection, have an in-built diode that does the job of fly-back voltage suppression: -



So, you "get them for free" with nearly all MOSFETs.

As for BJTs (Darlington or otherwise) more care is needed and regular flyback diodes need to be employed.


  I could not understand how those diodes are acting as flyback diodes


Consider the picture below. SW1 and SW4 are activated causing current to flow through the load (a motor in this example). If SW4 was momentarily turned off, in order for the back-emf from the motor's inductance to discharge its energy safely there has to be a return path for the current - that flows via D3 to the positive rail and back through SW1.



If both SW1 and SW4 opened at the same time then the current returns via D3, then through the power rails to GND then via D2: -



Thank you @transistor for the images. If you need any guitar or piano fills, just let me know!


  there is still magnetic energy stored in the inductor of the motor,
  but, I don't understand with which path it will be discharging and how
  this will protect the transistors.


The transistors are protected from inductive stored energy because no-matter what transistor opens, the inductive fly-back voltage that generates current, will flow safely back to the other terminal of the motor load without generating a voltage that can cause harm.