Cut open the avocado. If it's ripe, it should be dark green near the skin, and light green near the pit. If it's rotten, the avocado will be separated, stringy, and brown or black in color. One thing worth noting, is that exposing a ripe avocado to the air can also cause brown discoloration. If this happens, you can cut it off and still use it. There is a great post and graphic from Host The Toast that nicely illustrates and discusses this in more detail. Also, it is ok if there are some brown spots on the inside. But, if the avocado is nearly all brown, has fuzzy spots, and/or smells funky, then toss it.