Recently, I have installed MediaWiki version 1.22
onto my local machine.
I have added few templates pages, when I'm trying to use them, it displays
Template loop detected:
I also deleted some of old pages using admin login, but still it showing the same problem.
Template loops happen when two templates are transcluding each other, for example
Template:Foo contains
{{bar}}
while Template:Bar contains
{{foo}}
This can happen also through intermediate templates, e.g. foo transcludes bar which transcludes baz which transcludes foo.
Since I haven't seen your templates I can't tell what exactly is wrong, but the general advice is to look at your templates' source.