When you import torch. It will look for the __init__.py file in the torch/ folder (local folder or in the install directories of python).
For calling things inside a python module, it will depend how you import it. But here again you will get a much better idea by reading about python modules directly to get a better sense of what is happening.