What you have heard is not correct, rather that is a kind of tatayyur (superstitious belief in bird or other omens) or regarding seeing and hearing certain things as being bad luck. This is the way of the ignorant and the mushrikeen, who used to let such things keep them from doing what they wanted. Allaah criticized them for that and said (interpretation of the meaning):
“Verily, their evil omens are with Allaah but most of them know not”
“They (Messengers) said: Your evil omens be with you! (Do you call it evil omen) because you are admonished? Nay, but you are a people Musrifoon (transgressing all bounds by committing all kinds of great sins, and by disobeying Allaah)”
The Prophet (peace and blessings of Allaah be upon him) forbade superstitious belief in omens and said that it is a kind of shirk (associating others with Allaah) that detracts from Tawheed, because superstition is something that the Shaytaan uses to create fear. It is mentioned in several ahaadeeth that it is forbidden, such as the following:
The hadeeth of Abu Hurayrah (may Allaah be pleased with him) who said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “There is no ‘adwaa [transmission of infectious disease without the permission of Allaah], no tiyarah [superstitious belief in bird omens].” Narrated by al-Bukhaari, 5757; Muslim, 102.
It was narrated by Abu Dawood (3910), and al-Tirmidhi (1614) who classed it as saheeh, from Ibn Mas’ood (may Allaah be pleased with him) in a marfoo’ report: “Tiyarah is shirk, tiyarah is shirk,” but there is no one among us (who does not feel such things) but Allaah takes it away by means of tawakkul (putting one's trust in Him).
The words “but there is no one among us (who does not feel such things) but Allaah takes it away by means of tawakkul (putting one's trust in Him)” are the words of Ibn Mas’ood, not of the Prophet (peace and blessings of Allaah be upon him).
What this means that there is no one among us who does not some superstitious feelings in his heart, but Allaah takes them away from his heart by means of trust in Him and delegating one’s affairs to Him.
It was also narrated that Anas ibn Maalik (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “There is no ‘adwaa [transmission of infectious disease without the permission of Allaah] and no tiyarah [superstitious belief in bird omens], but I like fa’l.” They said, “What is fa’l?” He said, “A good word.” Narrated by al-Bukhaari, 5756; Muslim, 2220.
These ahaadeeth clearly indicate that tiyarah (superstition) is haraam and is a kind of shirk, because it means that the heart is attached to something other than Allaah. The people of the Jaahiliyyah believed that it could bring them some benefit or ward off some harm if they did whatever was dictated by their superstitions, and it was as if they were associating others with Allaah. So the Lawgiver cancelled that and demonstrated it to be false when He told them that it has no effect on bringing benefits or warding off harm.
Once this is established, if any such thing happens to you, then you have to fear Allaah and put your trust in Him, and seek His help and never pay any attention to it. You should handle the matter by doing what the Prophet (peace and blessings of Allaah be upon him) enjoined, as narrated by Abu Dawood (3919) with a saheeh isnaad from ‘Urwah ibn ‘Aamir (may Allaah be pleased with him) who said: Mention of tiyarah was made in the presence of the Messenger of Allaah (peace and blessings of Allaah be upon him), and he said: “The best of it is fa’l (optimism, belief in good omens) and it should not prevent a Muslim from going ahead (with his plans). If any one of you sees something that he dislikes, let him say. ‘Allaahumma laa ya’ti bi’l-hasanaat illa anta wa laa yadfa’ al-sayi’aat illa anta, wa laa hawla wa laa quwwata illa bika (O Allaah, no one brings good things but You and no one wards off bad things but You, and there is no power and no strength except with You).’”
Imam Ahmad narrated in his Musnad (2/220), and al-Albaani classed as saheeh in al-Saheehah (1065) the hadeeth of ‘Abd-Allaah ibn ‘Amr ibn al-‘Aas (may Allaah be pleased with him): “Whoever lets tiyarah (superstition) stop him from doing something is guilty of shirk.” They said, “What is the kafaarah (expiation) for that?” He said, “To say: Allaahumma la khayra illaa khayruka wa laa tayra illaa tayruka wa laa ilaaha ghayruka (O Allaah, there is no good except Your good, no birds except Yours, and there is no god beside You).”
It should also be noted that tiyarah will not harm the one who ignores it and goes ahead and does what he wants to do. But as for the one who does not sincerely put his trust in Allaah and who gives in to the Shaytaan and his waswaas (whispers), he will be punished by falling into the thing that he dislikes, because he has turned away from faith in Allaah. Allaah says (interpretation of the meaning):
“Whatever of good reaches you, is from Allaah, but whatever of evil befalls you, is from yourself.”