Mastodon is built on Ruby on Rails, which is very different from a PHP or perl script. It’s run as a standalone server, not as script files executed by a different webserver. It’s not going to work with XAMPP, which is designed for PHP apps. It’s a completely different set of technologies, they have nothing to do with one another.
You can install mastodon locally by following the development guide but this assumes some existing rails experience. I would recommend following the installation guide, which is more friendly to new rails sysadmins.
The specifics of how you install mastodon should be basically the same no matter where you install it, the only difference is what environment you’re installing into. Mastodon does not support Windows, and probably won’t work on Windows under any circumstances. (At least, i’ve never heard of anyone doing it successfully). While Mastodon works on most Unix systems, we only provide documentation for installing mastodon on Ubuntu.