Actually that algorithm would be O(log(n)). You are dividing by 10 (knocking off a 0 each time through the loop).
Generally an algorithm is O(n) if it scales linearly with the size of n, but for this, if you increase the size of n by a factor of 10, you only have one more iteration, instead of 10x as many iterations through the loop.
As requested here are a couple of sites with a brief primer. A quick google search will turn up many more:
http://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/ http://www.daveperrett.com/articles/2010/12/07/comp-sci-101-big-o-notation/