Despite their lush green leaves, aloe plants are from the desert, where the rainfall is very low. Black spots can be a sign of overwatering or of mold due to overwatering. Only water aloe plants when the soil feels dry to the touch.
Aloe rust is a fungal disease that causes both black and brown spots on the leaves. To avoid this disease, do not let water stay on the leaves.
When you see black spots on the aloe, reduce watering immediately. If that does not solve the problem, you may choose to pinch off the affected leaves or to take a cutting and start over from scratch.