Do i get a Mac OSX DVD when i buy a Mac Mini computer? And if not, how do I reinstall the system in case one day everything goes wrong?

Thank you.
The newer Mac minis (and I believe all other Macs as well) ship without restore media.  All of the newer models now have recovery volumes and an option for internet recovery built into their firmware.  The recovery volume (and internet recovery) has an option to download and reinstall the OS without the need for external physical media.


  OS X Lion or OS X Mountain Lion include a feature called Recovery that includes all of the tools you need to reinstall OS X, repair your disk, and even restore from a Time Machine backup without the need for optical discs.


You can read more at Apple's "About OS X Recovery" KB article.

Apple also provides a tool that allows you to create a similar recovery partition on a USB thumb drive.  About Recovery Disk Assistant