If we have 2 batteries one of emf x and the other is of emf y and we connect them in series we get an effective emf of x+y.
But what if we connect them in parallel, how to calculate the emf now?
In ideal circuit theory, the parallel connection of two voltage sources results in an inconsistent equation, e.g., a 3V and 2V source connected in parallel, by KVL, gives the equation: 3 = 2.
In the real world, batteries are not ideal voltage sources; batteries can supply a limited current and the voltage across the battery does, in fact, depend on the supplied current. This is represented as a series internal resistance.
So, the circuit diagram for the two batteries in parallel must include the internal resistances which will give consistent results.
The bottom line is that one of the batteries will supply power to the other and it is possible that one or both batteries will be damaged and, possibly, violently so.
You should not connect different batteries in parallel.
If you do, the battery with the highest voltage will discharge into the other one, until they end up with equal voltages. If the second battery (the lower voltage one) is a rechargeable, then it will be charged by the first one, again until the two have the same voltage. In this case the end voltage will be intermediate between the two starting voltages.
The current flowing between the batteries during this process will be quite high: it is equal to the different between the 2 voltages divided by the sum of the internal resistances of the batteries: $$I=(V1-V2)/(R1+R2)$$
This current may damage one or both of the batteries.
The other answers are good (especially the I = (V1 - V2) / (R1 + R2) equation that we will use) but I just wanted to give you ballpark estimates of some numbers that you can expect to see. Imagine that you are going to do this to a 9V battery and a 1.2V AA battery, then:
V1 - V2 = 7.8V
For internal resistances, it's hard to put ballpark numbers in the field but based on this excellent document from energiser then at most you are going to see internal resistances of 1.0 ohms. At room temperature you are more likely to see resistances of around 0.1 ohms. Now, if we assume that the internal resistances are roughly the same for both batteries then we can say that:
R1 = R2 (given) I = (V1 - V2) / (2R1)
Which we will now use for both possible internal resistances:
I(R1 = 1.0) = 7.8 / 2 = 3.9A I(R1 = 0.1) = 7.8 / 0.2 = 39A
So, as you can see, somewhere around 3.9 - 39 amps of current are going to be generated very quickly. Using p = vi we can then see that:
P(R1 = 1.0) = 30.42W P(R1 = 0.1) = 304.2W
Which is a lot of energy being released very quickly in a very small package. Which is probably why it is not unexpected to see such violent results. You're going to boil your batteries pretty quickly with all of that heat.
P.S. I'm just doing this by ballparking off the top of my head very quickly but the rough numbers make sense to me. I hope this helped give a better visual sense of what happens to the poor batteries when you do this.