The basics of algorithm is very simple, algo should be fast, means should take less time irrespective of the machine speed and other constants. There are some notations which define this theory. Here is a Video on that. Just go through this and you will understand all junk related to this.
Here is the video link:
Ok…Now there are some very nice books which helps to understand all we want to learn about algorithms. But before that you should be familiar with the data structures used in the programming language for example, array, linked list, stack, queues. After that go through this book.