Complexity has sense when your algorithm works with n similar elements. And says, how the time changes according to changes of n. So, if n rises 2 times and the time raises 2 times, you have O(n) complexity.
If the time raises as (n^2+2000n) function, we also say that the complexity is again O(n^2). The theory thinks only on greater values of n, greater than any other constants in your algorithm. So, the theory does not always fits your need, beware that. It is not the problem of the theory of algorithms, it is problem of its application that often doesn't pay attention to the important details
How you can guess? Well, if you are doing the same operation n times, where n is the number of array elements, you have O(n). If you are doing the same operation first n times, than n-1 times, than n-2 and down to 1, you have complexity n+(n-1)+...+1. It is n(n+1)/2, that is again const*n+const2*n^2. So, it is O(n^2). When n will be large enough, twice n will mean 4 time the time. Logics and arithmetics.