Śaranam has the meaning of taking refuge or shelter. Once taken in refuge it becomes the duty of the saviour to see the well being of the seeker come what may.
Krishna says to Arjuna in Srimad Bhagwad Gita Chapter18 that:
Sarva-dharmān parityajya mām ekam śaranam vraja [Bg. 18.66].
Krishna says leave all types of dharmas i.e. religious rituals mentioned in Vedas or Shastras (holy books) as they may or may not be easily understandable to you and you may not be able to study all of them in your lifetime. The easiest way out is to take the refuge in me i.e. come to my śaran, I will take care of you, I will protect you, I will get you what is needed for you.
It is mentioned in Srimad Bahgavatam that Sanakaadi saints (four brothers Sanak, Sanand, Sanat and Sanatan, sons of Brahma) who keep moving in the universe and have the access to Vaikuntha Dham anytime, the divine abode where Lord Vishnu resides, always recite “Hari śaranam” i.e. We are seeking the refuge in the lotus feet of Sri Hari.
Guru Teg Bahadur (9th Guru of Sikh religion) said in Adi Granth that:
pathith puneeth dheen bandhh har saran thaahi thum aavo ||
gaj ko thraas mittiou jih simarath thum kaahae bisaraavo ||1||
Guru Teg Bahadur Sahib says O my mind, come to the saran (refuge) of Sri Hari who is patith puneeth i.e. the One who wash away the sins and He is the one who takes care of the helpless.
It is He who saved the gaj (elephant) from the grasp of the grah (crocodile) when he cried for help and remembered Him with the offering of lotus in his trunk. Guru ji says if He is such a saviour then why do you forget Him.
Saint Tulsi Das writes in SriRam Charitmanas (Sunder Kaand) at the time when Vibhishana, the brother of Rāvana was ousted from Lankā and approached Sri Rāma for seeking His refuge, Vibhishina said:
Śravan Sujas Suni Aayahoon, Prabhu Bhanjan Bhavpeer
Thrai Thrai Aart Haran Saran Sukhad Ragubir
Vibhishan said O God, You are the One who destroys all the pains of this world, Upon hearing your glory I have come to your saran, Helpless as I am, after seeking Your refuge, my mind is in peace.