Call your insurance company as soon as you’ve taken pictures and documented the situation. The sooner they can assess the situation, the sooner you can begin the needed repairs. They will be able to walk you through what you should do when a tree falls on your roof.
Note: If the tree is large enough, you will have to contact a tree removal service to remove it. You should avoid the unnecessarily dangerous situation of trying to remove it yourself. It’s very important not to have the tree removed until your insurance company is satisfied with your claim. If the tree that fell on your home was rotten or diseased, remove any other trees like it that could be safety hazards as well.