You probably should explain more clearly what you mean by cog slipping.
If it is the freewheel not engaging, I would start by putting oil into it, and see how it goes. The oil may loosen the internal parts. If It continues to be a problem, you may have to buy a new one.
If it is the chain jumping over teeth on the sprocket, you will probably need a new sprocket. You could check the chain for stretch. You will probably need a new chain too.