Hello Naveen,
In encapsulations such as Frame Relay, HDLC, PPP (and I would assume ATM as well), when you ping your own interface address, the packet is in fact sent out the interface to the opposite device, and that device is supposed to return the packet back to you. This process can fail if the opposite device has the same IP address as you (in which case it simply consumes the packet without forwarding it further), or if its interface towards you is in a different IP network than your own interface (an exception to this rule is PPP, as it advertises endpoints' addresses).
and please clarify when we use HDLC and PP encapsulation, in HDLC we can ping local ip of an interface when looped but in PPP encapsulation local IP will not ping under looped condition.
I haven't tested this personally but I would assume that with HDLC in a looped condition, the router receives the packet it expects so it is happy, while in PPP, during the LCP negotiation, PPP will detect that the interface is looped and won't consider it operational.
Best regards,
Peter