Chains are nominally supposed to last for about 750 miles (depending on your habits). Cassettes are supposed to have a few thousand miles in them.
It's not good to mismatch a worn chain with a new cassette and vice-versa. This is because the two wear into each other (so to speak); replacing one produces a mismatch. For example if your old chain is stretched out it will start to grind down the teeth on your new cassette, etc).
Periodically cleaning the chain is a good idea. I use one of those funny clamp-on gizmos from Park (a long time ago I used a pan of kerosene and a toothbrush). Lubrication is important; I've been told to lube every week, or every couple of hundred miles.
Others may have more technical suggestions.