A bowler can bowl six legal balls at a time in cricket. The completion of six legal balls is called an over. Once an over is complete, he or she is replaced by another bowler, who bowls from the other end of the pitch.
A one-off instance
Up until 1889, bowlers could change ends by bowling two consecutive overs. However, no bowler was allowed to bowl any more than two consecutive overs. A rare oversight occured in 1951, when Alex Moir of New Zealand bowled two consecutive overs. Moir bowled the last over before tea and the first after the tea break.
In the laws of cricket, the 17th law describes The Over. In its sixth sub-section, it is stated that one bowler cannot bowl two consecutive overs. If a bowler wants to change ends, he or she can do so, provided the player does not bowl two consecutive overs. In such a scenario, the captain will have to rope in two other bowlers for the next two overs who can bowl the overs such that the bowler who wants to change ends can do so.
Thus, bowling two consecutive overs by the same bowler in modern day cricket is not allowed.