As a rule when you replace a chain that is worn, replace the cassette at the same time. Check your chainrings for wear and replace those if they need it. When a chain wears it becomes stretched and the rollers dont sit in the valley of the cogs, they ride up further on the edge of the cog wearing it out. When you fit a new chain onto old cogs it has a tendancy to want to slip over the worn teeth because it has less to grip onto.