Let's take the example of Queen Urraca, who inherited the Kingdom of Leon-Castilla from her father Alfonso VI in 1109 and ruled as reigning queen until 1126. She had had two children with her first husband, who died in 1107, but things didn't go so well with the second, Alfonso the Battler of Aragon. They separated after just a few years of marriage, and she took a favorite from among her courtiers, with whom she had at least four children. Two lived to adulthood, where they were acknowledged members of the court, one died as a young child, and the last caused Urraca's own death in childbirth at age 45. So what happened to her because she had bastards? Nothing in her own day because she was a powerful ruler, but you should see what they wrote about her from the thirteenth century on. Medieval slut-shaming.
I'll answer this the best I can from knowledge I've gained in-class and on my own research experience. It's not exactly my forte, but I'll give it a shot.
What I have to offer are a few historical examples of bastards in the Medieval period. The classic example (at least in my opinion) is William the Conqueror, who before he had this moniker was called "Guillaume le Batard" (William the Bastard). His mother was not exactly one you would call "high born," and this be a very touchy subject with the Duke of Normandy throughout his entire life. He was his father's only son, but since he was illegitimate, he had quite the power struggle in his first few years of rule.
In general, however, whenever a nobleman would have children with a mistress (be she high or low-born), the resulting offspring would be given some sort of inheritance (land-holdings, usually) and quietly brushed off the stage of primogeniture and succession.
This more answers the "What would happen" part of your question, and not the "female ruler" part, of course. I can't say I know of any examples of an incumbent ruler bearing children during this specific period, but there are a few other relate-able cases like William's that may help:
Elizabeth I, Queen of England: Famously the daughter of Henry VIII and Anne Boelyn, became Queen under the controversy of her father's marriage. Many claimed that she was herself a bastard on the basis that Henry's divorce from Catherine of Aragon was illegal. She was also declared illegitimate by the Second Succession Act, under her father's reign. Also of interest to you may be the unhistorical film "Anonymous," which plays with the hypothetical scenario of Elizabeth having bastard children (they similarly are given titles and swept under the rug).
Catherine the Great, Tsarina of Russia: This was a popular thread yesterday I believe, but Catherine took many male lovers and used them as political tools. Though this is outside of the specified timeline by some degree, she is in fact a female ruler. She had one son by her lover Grigori Orlov, Aleksey Grigorievich Brobinskoy. Brobinskoy was her only bastard, and was later made a Count by his legitimate half-brother, Emperor Paul. Catherine herself openly recognized that he was her son, and even temporarily allowed him to carry the name Romanov. Opponents of Catherine, I assume, couldn't really do much about Orlov or his son, since the Tsarina was really in control.
In short, it seems like bastards, being either descended from male or female rulers, were treated about the same as the birth-mothers themselves: the whole situation kept quiet but acknowledged.