The hadith simply means you are not asked to harm yourself to reach a goal, nor are you allowed to harm any other person to reach it. As the later will create the which of vengeance and cause much more harm.

For example:  
In a fatwa I've read among the examples to explain this hadith that some husbands harm their wives just to seek a khul'a or by a talaq to get the mahr (or parts of it) back,  which is quoted as one of the biggest sins in [this hadith][1] in mustadrak al-Hakim.  
Also smoking is quoted, as it harms the own health and the health of those people sitting around you.

Note that scholars are in consensus that the some of the sources of these narration strengthen it however each single narration with a full chain includes da'if narrators (except the one from al-Muwatta' which is mursal and therefore has an incomplete chain). However adh-Dhahabi seems to agree that the version from al-Hakim's mustdrak follow the conditions of imam Muslim.

Maybe an other version of this hadith is more self-explanatory:
> “He who causes harm to a Muslim will be harmed by Allah, and he who acts in a hostile manner against a Muslim, will be punished in the same way by Allah.” Related by [Abu Dawud][2] and [At-Tirmidhi][3] who graded it to be Hasan (good). (source [bulugh al-Maram][4] see also in sunan [ibn Majah][5])

If this was not helpful enough consider commenting and I'll see if i have time to elaborate more as then I would need to explain the fiqh point of view too.


  [1]: https://library.islamweb.net/hadith/display_hbook.php?bk_no=594&hid=2668&pid=
  [2]: https://sunnah.com/abudawud/25/65
  [3]: https://sunnah.com/tirmidhi/27/46
  [4]: https://sunnah.com/urn/2118150
  [5]: https://sunnah.com/ibnmajah/13/35