My maple tree has black in the trunk
You are seeing evidence of bacterial wetwood (or slime flux) in your tree. Unless the tree is also under stress for other reasons, it is more unsightly (and potentially smelly) than dangerous to the tree. Bacteria enters through a wound in the bark and feeds on the sap in the tree. More information on the disease and how it affects your tree is available here (https://extension.psu.edu/bacterial-wetwood-or-slime-flux) from Penn State University.
The lichen on the trunk of the tree indicates that it is growing slowly and is in a humid location (under a tree canopy is frequently humid). It is not harming your tree but if the tree is under other stress, or not old enough to have slowed in growth, you should consult an arborist about its health. Given the confluence of these events, that might be a good idea.