Your code snippet is calling the hello function directly. That's why the function is running.
For Flask, you define the routes using decorator functions. When you navigate to a URL that matches the decorator, it will execute the decorated function. In this example, if I navigate to "/" on my webserver, the hello function will execute.
To actually run your server, you need to do the following from the command line (which can also be found in Flask's documentation.
$ export FLASK_APP=hello.py
$ flask run
Where hello.py is the name of the file containing your Python code. You should also remove the direct call to hello() in your file. Then open a browser and navigate to http://localhost:5000/ to see the result.
Decorators are functions that wrap other functions in an attempt to alter the behavior of the sub-function. You can read the very detailed explanation in the Python wiki.
Decorators take in a function as their argument. Typically, decorators run some code before executing the sub-function. For example, if you want to add authentication to certain endpoints of your Flask app, you can use decorators. The decorators check to make sure a user is authenticated to use a resource before the actual code of that resource executes.
return "Hello world"
The authenticate function will run first. And then if the user is authenticated, it will call hello to execute the rest, otherwise, it will send an error back to the user. In the case of Flask's decorators, they are checking to see if an incoming request matches the route you've specified. If it does, then it executes the function. Otherwise, it checks the next route.