As you may know, Dumbledore had a very special ring that was a Horcrux of Voldemort. He was very excited about it but he quickly realized that the ring was cursed and it would poison anyone who tried to wear it.
This was one of the biggest mistakes that he had made and it had nearly cost him his life. He realised that he had less than a year to live and he didn't want Harry to see his hand blackened so he hid it from him.
It's a shame that Dumbledore didn't tell Harry how his hand got blackened because it would have been very difficult for him to explain to Harry the Deathly Hallows without being able to show him. Also, he might have had some regrets about his actions and wanted to keep them secret.
Dumbledore's hand was blackened because he tried to wear Marvolo Gaunt's ring which was a Horcrux of Voldemort. The ring was very powerful and if anyone was able to find it and wear it then they would get poisoned and die instantly. This was what he did and it was the reason why Snape had to intervene so fast because the curse on the ring was very strong.
Dumbledore knows that he will die soon and that's why he wants to get rid of all the horcruxes before it is too late. He will then give Harry all of the information he has about them and help him destroy them all. This will give Harry the chance to defeat Voldemort once and for all, but it's going to be a very long process.