This is how overrate is calculated for different formats:
ODI: In ODI, 50 overs should be completed in 210 min as per the rules and out of this 10 min is provided for Drinks breaks. So the total time allotted for an over is 200/50 = 4 min. By considering this, the over rate per hour is 15 overs.
T20: For T20, the total time is 75 min and 20 overs has to be completed in 75 mins(Drinks breaks are included in this).
Test: For every test match 90 overs has to be bowled in 6 hours and team can get an additional half an hour at the end of the day if requested. Again 15 overs should be bowled in an hour and 7 overs in half an hour.
Slow overrate rules:
As per ICC's Standard ODI Playing Conditions:
The minimum over rate to be achieved by a team is 14.28 overs per
hour. However the actual over rate will be calculated at the end of the match
by the umpires.
The rule regarding slow overrate is:
A fielding team has to adhere to "Minimum Over Rates." If a team is
short upto two overs in an ODI it is a "Minor Over Rate Offence". A "Serious
Over Rate Offence" is if a team is more than two overs short in ODIs. It is the
same for Twenty20 Internationals while in Tests, upto five overs short
is a "Minor Over Rate Offence." More than five is "Serious Over Rate
As per ICC's rules, a captain will be fined 20% of his match fee per one over for the offence. Each player of the team is also fined 10% per over. If the captain is guilty of "Serious Over Rate Offence", he will be was banned from one match.
Here the important thing is:
While calculating overrate, Umpires will take into consideration
the time lost during an innings, due to treatment for an injured
player, a player leaving the field for serious injury, third umpire
consultations, time wasting by batting side and all other
circumstances that are beyond the control of the fielding side.
That essentially answers your last question on batting team delaying things.