To take an example you can look at -- on the "Consoles" page inside PythonAnywhere, at the bottom of the page, there is a section where you can look at the processes that are running. When you first look at it, there's a button that says "Fetch process list". If you click it, the page does not reload -- instead, after a brief pause, the bottom of the page changes to show a list of running processes. The list has a "refresh" button at the top; if you click that, again, the page does not reload, but the list is refreshed in-place. And each process has a "kill" button, which will kill the process in question, once more without loading the page.
But you don't need all of that if you just want to experiment; a good set of tool to start with is jQuery to do in-place modifications of the web page and also to provide a nice way to make AJAX requests. For the server side, @dull's suggestion of using
flask.jsonify is a good one when you're using Flask -- it's a simple way of converting the data that you want to send back to your JS code into a format that it can easily interpret.