I have a peace lily that has brown leaves and sap on the leaves
Can I remove the leaves that have turned black ? There is also something brown on the stems and sticky on the leaves.
Yes, you can remove the black leaves. Cut the leaf stems off at the bottom, where they emerge from the rhizome, which is under the soil. The brown things on the stems are scale insects, and the sticky sap is called honeydew, and is produced by the scale. You can get rid of them by using the techniques in this article: https://www.gardeningknowhow.com/plant-problems/pests/scale-bug-how-to-control-plant-scale.htm