Hi Kunal,
When the routers comes up and if it has the devices connected to its interfaces and they are not in shutdown state it will detect that the interfaces are up and up and are directly connected to each other.
Router will definetely be able to ping its directly connected interfaces and even devices connected to its interfaces will be able to ping each other as they are directly connected.
If you do "sh ip route" in your router you will see all directly connected devices.
The Basic functionality of the router is to to route the packet or to show the packet right path to reach the destination. So everypacket which comesinto the router check the routing table and as per that it travels and reachg the destination.
HTH
Ankur