This is a phrase that parents often use with their children when the children don't do what they're supposed to. It means that the parent has told the child to do something many times in the past, but the child still isn't doing it:
How many times do I have to tell you not to borrow my stuff without asking?
How many times do I have to tell you? That is not a toy!
Although this phrase is mostly used between parents and children, it can be used in some other relationships, such as between a married couple. Bosses might sometimes use this phrase with their employees, but it's a very direct criticism. So a boss that uses this phrase will be thought of as quite strict and controlling.
There is another use of this phrase. When you are talking to someone that you don't have any control over, like a friend of yours, you can say "How many times do I have to tell you..." as a joke in response to some small mistake that they make. The reason it's a joke is because you both know that the phrase is supposed to be used by someone very close and in a position of power. Since your relationship doesn't fit that mold, it's taken as a joke.