Depending on the context, the term mistress can signify very different things.
Originally, a mistress is a lover who is in a long-term relationship with a partner she is not married to, but her partner is married to another person. A mistress is not a prostitute but a female who is usually kept a secret from the spouse of her partner.
A mistress, within a BDSM context, is a female who is the dominant partner in a top/bottom relationship. In this sense, this type of mistress can be also known as BDSM mistress or dominatrix. As a term, mistress represents the female version of "master", which is a term used for a male partner who is dominant.
Reasonably, the BDSM mistress controls the submissives, often demanding them to meet her requirements. It is a common occurrence for the submissives to be required to perform specific tasks, including sexual acts. In case the submissives are disobedient and do not do what the BDSM mistress asks for, the dominant mistress may penalize the submissives for wrongdoing. In the role of a dominatrix, the mistress has to be pleased at all times. Otherwise, punishment is inevitable. Regular tools for punishment are different kinds of whips, nipple clamps, electro sex toys, etc.
Both, BDSM mistress and master are considered dominant terms, so they are always capitalized in BDSM literature. Per contra, the submissive terms such as slave are not capitalized when written. Such practice is usual because it is a way of paying honor and respect to the dominant partner.