When you find yourself trying to remember a show (or any works) that's on the tip of your tongue but just out of reach, come here - the collective brain of the TVTropes community can probably help. Post all the details you can remember (examples help). If you're looking for a trope, head over to Trope Finder. Have general questions about tropes? Visit Ask The Tropers!
I'm almost certain that this is Shadowland by Peter Straub. The younger boys were named Del and Tom, and the older boy Skeleton Ridpath was a prefect at the school they were attending. The scene where Skeleton died in the fire in the auditorium wasn't at the end, it was much earlier in the book, at the end of a magic show that Del and Tom had been performing for the school.

I remember reading this book...I think prior to the year 2000. It was about two boys who were learning magic from the...uncle?...of one of the boys. And the nephew was concerned that his uncle liked his friend more or thought he was a better magician or something. I remember a scene where the boys were on a train and one or both of them were practicing card tricks. There was another boy that they called...Skeleton? Pretty sure it was Skeleton...and he was evil. But he was also able to do real magic. At the climax of the story, the two boys are in...an auditorium? a barn?...and the Skeleton boy is...in the rafters?...anyway, they end up burning the auditorium down and I think killing him.