An infinite loop occurs when a condition always evaluates to true. Usually, this is an error. For example, you might have a loop that decrements until it reaches 0. But, if the i value of the loop is negative it goes endlessly. In reality in comes to an end but due to a reason called overflow, it goes into infinite loop