Dialects explains that the world is full of contradictions and opposing forces. When these opposing forces come together, they can form a new thing. An easy example is to look at multiple opposing news sources to piece together the entire truth of an event.
Dialectical materialism is Marx's concept that contradictions in material conditions of life are what drive historical change. Primarily that the economic base (economic classes, resources, working conditions) is what shapes the superstructure of society (laws, politics, culture.)
Weird because there's literally no source that states he was celebrating Stalin's death. He wrote the piece about Stalin when he died, but it certainly isn't celebratory in tone or spirit. Shostakovich also never said he was celebrating Stalin's death. I'm assuming that's just how you interpret the piece.