Islam is entered by the declaration of faith, and a person remains a Muslim as long as they keep that belief. The Quran says that Allah does not forgive the ascribing of partners to Him but forgives lesser things for whom He wills. The Prophet Muhammad ﷺ taught that whoever testifies sincerely from the heart that there is no god but Allah and that Muhammad is His messenger, Allah forbids the Fire to them. Many Muslim women who do not cover their hair pray, fast, give charity and love their faith.
Most scholars hold that covering is required, so for them a woman who does not cover is falling short in one duty, as many people fall short in prayer or honesty, and her case is between her and Allah. Other Muslims believe the Quran does not require it. In either view, it is not for anyone to declare her out of the faith or to talk down to her. In a hadith in Muslim, the Prophet ﷺ told of a man who swore that Allah would not forgive someone, and Allah said that He had forgiven that person and had cancelled the swearer's deeds.
The Quran tells believers to invite to the way of Allah with wisdom and good advice. A mother or friend who speaks gently and leads by example does more than one who shames. And the opposite is also true: a woman who wears hijab should not be treated as backward or assumed to be forced.