This happens to all women at some point in their life. At least you now have it out of the way. Basically, it only lasts for a short while, usually no more than a couple months, but you have an infection. What has started to happen as a result of that infection, is that you are beginning to create faeces in your uterus. Notice that it is quite dark, and there usually isn't much, so it's not quite the same poo that comes out of your bottom, but it is still the same thing.
As long as you clean regularly it will go away.