For sending Emails you need an SMTP Server, which does the job for you. Either set up your own SMTP Server (but i dont recommend this for many reasons), or use a known SMTP Server from the internet (for example Google, GMX or similar).
At next you have to edit php.ini and change the Email Settings in order to use the sendmail.exe program, that comes with Xampp.
In that sendmail program, you have to edit sendmail.ini, in order to use the above mentioned SMTP Server. Most important, you have to supply the servername, the port, the username and the password for that SMTP Server. These credentials are the same, as you might have applied in your standard email client (Thunderbird or similar).
Sending Emails from private PCs is a difficult job and you have to configure all these things very precisely, otherwise it wont work.