You need toothpicks, scissors anything small and flat that can get through the bristles to the base of the comb to get all the hair out.
Taking some scissors, cut the hair in the brush lengthwise down every 2nd or 3rd row making sure you are cutting in between the bristles.
Taking the tip of the scissors, slide the scissors lengthwise underneath the hair and lift. The hair should lift right up. Continue until all the hair has been removed.
Optionally use the hose attachment on the vacuum cleaner and I vacuum the rest of the hair off the brush.
When most of the bulky hair has been removed, set your brush in a sink that has some warm water mixed with a small amount of shampoo or dishwashing liquid.
Alternatively use white vinegar along with shampoo and baking soda. Wet brush, sprinkle with baking soda, and pour about 1/4 teaspoon, 1 teaspoon of white vinegar over baking soda. Leave it for 15 minutes.
Or if you don't have white vinegar, put baking soda or ammonia in a tall glass, add a brush and combs, then add boiling water and let it sit.
Taking a spare toothbrush, scrub/brush vigorously up and down each row of your hair brush and also all around the top.
Kenorb's answer seems very thorough but, if you're OK with the results not being perfect, you can use my method: Scrape it out with a fork. The tines get between the brush bristles easily and, by grabbing it in 3 or 4 places at once, it's much more likely that you can pull out the entire hair instead of breaking it or slipping loose. I strongly recommend that you wash the fork before eating with it.
Source: I've done this and it totally works, even on dog brushes.
Hold the brush in one hand and the comb in the other. Put the comb at the end of the brush that is furthest from you and wiggle it right down to the ends of the bristles where they meet the back of the brush. Now pull the comb towards you (along the length of the brush) gathering the mat of hair out of the bristles as you go. Eventually the comb pops out of the bristles at the end closest to you, with the hair all in front of it. Pull the hair off the comb with your fingers and throw it away.
Put a piece of paper in the bottom of the brush, make sure the bristles can go through, or instead of paper( use something that can get wet and stay dry, if you brush your hair wet) after this step brush your hair normal and they once you are ready to pull off the hair rip the paper( or whatever you used) off and your brush should be cleared, then reapply.