The same book Oleg mentioned will tell you to understand complexity of some well known algorithms and also any algorithm in general. But I personally feel that the book is not very beginner type.
Usually space complexity is given less importance these days due to availability of large main memory sizes, virtual memory,etc.
For time complexity,there are two widely used methods, the simple method based on guessing the overall complexity when its known for small input size and the master method based on predefined formulas.
There a nice introductory explanation
here .
Hope this helps
