It is mainly Muslim (that is, people who believe in Islam) women who wear headscarves. It is a religious habit and has no practical effect. Ordinary believers only need to wrap their hair in order not to be seen by others.
Now, some women are more open-minded, and wearing headscarves is voluntary, but not in small cities or rural areas. If you don't wear headscarves, people around you and those at home who are less open-minded will accuse you.