Firstly, to put your mind at ease, the majority of claims that someone is attacking you through use of black magic, is usually just all big talk. They probably don't have the know how or experience to harm you in anyway.
But basically it means that someone using this cowardly technique is trying to harm you either psychologically - causing fear, distress, depression. Or they may try to do this psychically, that is by trying to send negative thought forms to you in order to scare you. They do this either/or through a form of meditation and/or ritual.
However, if it is the case that someone is trying to harm you either psychologically or psychically then it's simple to ward off. Do a meditation exercise that includes reinforcing your aura by white light and blue light - both are protective colours. Also visualise a mirror with it's glass/reflective surface facing away from you. Then imagine any negative thoughts/people hitting off the mirror and bouncing back to the sender. Alternatively, some people visualise a rope or thread that attaches them to their 'attacker', you simply visualise cutting this rope or thread with scissors or a knife so breaking contact with them. You can also say your favourite prayers or poems to lift your mood. Also keep your mood positive and light hearted - laughter as well is one way to ward off any negativity.
There are many good meditations that you will find on the internet to help you with this - just look up 'protective meditation' or 'self protection rituals' or 'using your aura for protection against negative thoughts'. This will give you a few sights to choose from. Lastly, take heart from the fact that if anyone is trying to 'do black magic' on you, then whatever they give out to you or other people, will come back to them three times over.