Friends are not subjected to an ethical code of conduct, counsellors are. Confidentiality is part of the ethics that the counsellors practice.
Friends can offer practical advice, but they often do not know how to help you get to the core of your problem. Also, friends are not objective in helping you with your problems.
You can't always tell a friend everything, but you can tell a counsellor anything.
Your friend may have trouble dealing with your problem. He or she may share your problem with others to get advice. Your counsellor is bound by law to keep your problems private.
A counsellor is trained to help you get at your true feelings and to help you cope with your feelings. Friends often just support how we feel.