In a nutshell
Kadane's algorithm finds the highest-summing stretch of neighbouring numbers in one left-to-right pass. It keeps a running total of the current stretch; the moment that total turns negative it would only drag the next numbers down, so it throws it away and starts a new stretch. The biggest running total ever seen is the answer.