Depression is a horrible thing to deal with, especially if it is coupled with anxiety. Part of the problem is withdrawal which inhibits seeking help when needed. Also, many dealing with depression try to mask it and act normal. I believe that there are various forms of depression, and it affects people in different ways. For example, there can be more of a situational depression, caused by a reaction to something that has happened to the individual. In these instances, there may be immediate danger of suicide, but there also is a more likelihood of a quicker recovery from the instance. Other depressions, maybe due to physiological imbalances may be deeper and harder to overcome and require significant therapy and likely medications that may be required for a long time.
If one notices changes in behavior by a friend or someone you know, you can ask the person if they are having any problems, let them know you are there to support them if needed. But the biggest key is getting the person to seek help from a professional. Getting out of depression can be extremely difficult and may require professional help along with medications.