I've found that the best way to extend the life of a ripe avocado is to mash it up, put it in a plastic container, flatten it out a bit, cover it with an inch of water, and finally put the lid on the container and put it in the fridge. It will keep for a few days like this. The water will seal the air out.
Someone may know a better way but besides seeing that the avocado is bad (which should suffice for most cases) you have to feel it. If there is very little resistance then it's probably bad. Cut it open and see.