I am working with hardware guys and trying to monitor switches.Those guys deployed switches with some connectors,to implement such a logic in which whenever switch A goes down switch B goes down as well, very similar to a tree structure or parent/child.I can login to switch interfaces,problem is how I can find this connection between two switches.The idea is network monitoring needs to implement same tree logic between them.I am an alien to network hardware.
Depending in the exact makes and models, very often some kind of discovery protocol is used.
E.g. for Cisco switches
show cdp neighbors
For HPE Procurve/Aruba switches
show lldp info remote
(Note that CDP [proprietary Cisco] and LLDP [open IEEE] are distinct protocols. On most devices, CDP shows no LLDP devices and vice versa. HPE/Aruba often bunches them all together though.)
For more detailed information you'll need to add the device info to your question. Note that discovery protocols are L2-only, so the switches need to be connected directly or via L2-transparent hardware (e.g. media converters) for them to work.
LLDP and CDP are very similar. Both usually show a neighbor's (management) IP or (base) MAC address, device name, features, ... The available information is generally device-specific and varies considerably. The protocols are very common for switches but much less so for other devices.
Once you've got the neighbor information you should update your documentation and configure port/friendly interface names.
If you already know the MAC addresses of the relevant devices you can also use
show mac address-table to find out which port (and possibly VLAN) they are attached to.