The Haunted Mansion closes late summer/early fall to get its overlay, ready for the start of Halloween Time at the the Disneyland Resort.
Once installed, the Mansion is completely transformed, and becomes a totally different attraction unto itself. The scenes can vary slightly year to year, giving you a different experience every time.
Haunted Mansion Holiday runs all the way through to the end of Christmas Season ("Holiday Time"), which ends in early January. At that time, the Mansion will close once again, and the regular version will resurface a few weeks later.
Due to its popularity, Disney's FastPass service is normally available during Haunted Mansion Holiday's run (not usually available for regular HM). Check on the day of your visit.