Is it being underwatered, overwatered or disease? Or could it be cold? Thank you very much!
I imagine it was not originally this color and was much closer to the one remaining part that looks like a tan/yellowy green ball?
I do not know much about cacti specifically, but the dramatic color change is very disturbing. This article gives a few different causes and a few possible remedies. It is looking rather bleak for your cacti, especially since I'm responding 10 days after you asked the question.
Make sure to read the article because this is a very bare explanation and does not detail the why behind what you are doing. Understanding why is important so that you can do it correctly and learn for the future. You have two plans of attack- address potential crown rot by inspecting roots and replanting, spraying off ALL of the dirt from the plant to prevent the disease from spreading to the new pot.
I am sorry, but I think it looks very bleak for your cacti. If I wanted to try to save it, I personally would start with the second plan of attack by removing all of the black parts of your cacti assuming the disease is in the plant body rather than the roots and then look at the roots.
Whichever route you take, I would check the other area. Honestly, I would cut off the black parts of the cacti either way. I can't imagine how keeping them would be beneficial in any way for the plant. I know that in removing the black parts of the cacti you would be removing most of the plant, but the reality is that that little tan ball is all that is likely remotely healthy in your plant and leaving the rest of the plant intact probably would mean the tan ball will be infected soon.
**Make sure to sterilize whatever tool you use to cut the diseased part of your cacti with, before you cut it, and especially after you cut. You do not want to spread the disease to other plants by means of your unclean tool. **
I'm sorry share bleak news. Hopefully the article either allows for an amazing rescue or a better informed protection for the next cacti.