Allowing CORS is part of the configuration on the web server of the resource you are trying to request from.
Imagine if each domain is a house, and the data you're requesting is inside the house. CORS is the lock on the front door.
If the host you're running your app from is on the same domain you're already inside the house and you can get to the data in the house no problem.
If you're coming from outside (different house/domain, such as when you're previewing from localhost or construct.net), CORS will block your AJAX data request.
So the owner of the server has to disable CORS on their webserver by setting it in their config, basically leaving the door unlocked. This will allow requests from outside domains through.