How do I make plugin which makes an AJAX call to the server?

If you want to reload a plugin using AJAX, you can do this very easily by using either the refreshPluginSlotAnchor() function or the refreshPluginSlotJS() function to generate the html/JavaScript needed.

If you want to send an AJAX request then you can use the pluginAJAXLink() function in PHP, or the AJAX() or JSON() functions in JavaScript, to call your handlePluginAJAX() method.