The worst thing is, I can't decide which cactus this actually is - I'm inclining towards possibly a Euphorbia of some description, or more likely Orbea tubiflora maybe, but I really am not sure. Even so, there are some things you can try - first, can you get hold of some sterilised potting compost rather than just garden soil? It needs a sandy or gritty free draining potting medium as soon as possible, and a pot with drainage holes in the bottom if that one doesn't have them - in the meantime, and ongoing, stop watering, you're watering way too much. I don't know what part of the world you're in, but most cactus can go weeks without any water at all, particularly during the winter months, when they should be watered very sparingly occasionally just to prevent shrivelling. I wouldn't suggest you water it at all at this stage for at least a month, and then see how its doing - even when you do start watering, just a little maybe every two weeks, or less often if its winter where you are.
The purple streaks may mean its already too late and a fungal infection or rot has already set in and the plant will just die, but if you want to try and save it, follow the advice given above. In the meantime, I will spend more time researching what plant it could actually be... if its one of the Orbeas, they are at real risk of rot if watered too much from autumn through winter, though they need more water once spring arrives, at which time, rot should not occur.