If the avocado has only a light brown tint to it or only one small section of it has turned brown, it is still edible; it will have a slightly bitter taste, but is safe to eat. The lightly browned part can be cut away and the remaining part is edible. If the avocado has turned brown throughout the fruit or looks stringy, it has gone bad and should be discarded.
Avocados turn brown for two reasons: due to over-ripening or exposure to oxygen. Avocados that have been bruised, especially when ripe, are more likely to turn brown before cutting into them. Most avocados, such as Hass avocados, have a yellowish-green flesh that is greener closer to the skin and yellower closer to the pit.
After cutting open an avocado, any unused portions, such as that included as part of guacamole, should be mixed with acid like lemon or lime juice or cider vinegar to help keep it from turning brown. Another way to keep it from turning brown is to leave the unused half with the pit intact. Wrapping exposed avocado tightly with plastic wrap will also help keep it from turning brown. Keeping avocados in cold water until ready for use will also help keep them from turning brown.