You should first understand the CRXDE console fully and how its working, then you should learn HTL. After this, you can move to Java concepts like Sling Models, Servlets, etc.
Seems like this is a service in which you are using tag manager. Service is a Session based concept. You can create a different class and define the tag logic there and call it in your service implementation and check if its working.
If we have 3 components using same Clientlib and we are using all 3 components in page. Then how many times that clientlib will be called in page and what is the reason behind it?