The two types of brick chimneys are brick veneer and true masonry chimneys. A brick veneer chimney starts out as a wooden structure that is framed with studs and some sort of sheeting, then a brick veneer is applied to the outside of the chase. The brick is a veneer and is not structural in nature. A metal firebox insert is installed in the bottom and a metal flue extends up through the hollow chimney chase. At the top a flat metal cap is installed to weather proof the top of the cap, it has a hole in it for the metal flue pipe to extend through. If these caps are made of galvanized metal they will usually rust. Most of the time they are nailed through the top and the nail head caulked. This will leak over prolonged exposure to the elements.
The true masonry chimney is a stone fire box with a, usually clay flue pipe that extends up with a solid brick surround. The tops where the flue pipe terminates are capped with, usually mortar. Over time moisture penetrates the mortar cap, freezes and causes cracking to occur, resulting in leaking into the structure. If you are experiencing leaking into the fire box it is most probably coming in near where the flues on either of these type chimneys terminate. A flashing or water absorption issue of the brick and mortar will usually show up in a ceiling.