There are lots of ways to run a local host, which is necessary for testing AJAX (and useful when it comes to other tasks). This document covers setting up a simple Node-based HTTP server, but you may also choose to use one of the MAMP/WAMP applications to start a local Apache instance, or use Python's simple server.
Before doing anything else, install the latest version of NodeJS. Node is a runtime for desktop/server JavaScript (as opposed to running scripts in the browser), and many useful tools are built on top of it. If you find this helpful, you may also want to look into LESS, Grunt, and other Node-based development tools.