One over consists of six legal balls. An over can be more than six balls if the bowler balls illegal or extras then that delivery needs to be bowled again. The over can thus be stretched to more than six balls. This allows the batsman to score more runs in one over.
There is no limit to how many illegal deliveries can be bowled. Hence, there is also no limit to how many runs can be scored in one over. In International cricket, Pakistan’s Mohammad Sami holds the record for bowling most balls in one over: 17. However, he conceded 24 runs in that over. This is not the all-time record for most runs scored in one over.
In Test cricket, Brian Lara holds the record for most runs in one over. He scored 28 runs in an over bowled by Robin Peterson. In ODIs, Herschelle Gibbs holds the record for the most runs in one over: 36. He hit a six on each ball of that over bowled by Dan van Bunge of Netherlands. He achieved this feat in the 2007 World Cup. In T20 cricket, Yuvraj Singh has hit 36 runs (six on each ball) off England’s Stuart Broad in the 2007 T20 World Cup.
The most runs scored in one over can thus range from 36 to an endless limit if at all the bowler keeps on bowling extras like no-balls and wides. But that would be irrational and 36 is the only imaginable number as of today.