There are three approaches.
Mechanical, that is clean it off. Some people use power washers. I suspect it will do more damage to the roof than the mold is doing.
Chemical, Sum suggest harsh chemistry like bleach. That will kill it and it will likely also wash off on it's own after it has been bleached, but other than a weak solution I would worry about roof damage by the bleach. Then there are commercial chemicals that you spray on. I did try one of those and it worked, it killed the moss/mold and it was washing off. The product indicated it will need to be reapplied from time to time, but I will not know about that for a while as my roof was just replaced due to hail damage.
The use of copper/zinc materials are also suggested. These are metal devices that are put on the roof for long term protection.
Many roofing materials come with mold/moss resistance built in and that should last 5-15 years depending on what the add and your local conditions.
Good Luck