Why I think this is a great question
Even after Matt Walsh insulted everyone who could not answer this question in his documentary "What Is a Woman?", and specifically accused someone of providing a circular definition when he said "a woman is someone who identifies as a woman", Matt Walsh himself provided a circular definition at 7:50 in this interview with Piers Morgan when he said "a woman is an adult human female and a man is an adult human male" without defining "female" and "male".
Therefore, I think this is a great question and that Stack Exchangers can do a better job than Matt Walsh did :)
Brief note about semantics
As with many questions in the realm of semantics, definition 1 might be satisfactory to population A and rejected by population B, whereas definition 2 might be satisfactory to population B but rejected by population A. Twenty years ago (or even two years ago) this question was not being asked as much as it is now, and the sizes of populations A and B (and perhaps C,D,E,...) have changed. The population that identifies as right-leaning tend to prefer definitions like "A man is an adult human with a Y chromosome and a woman is one that does not have a Y chromosome", whereas the left-leaning population tends to prefer definitions like "a woman is someone who identifies as such" (but for a topic like this, there are many exceptions on both sides).
Community consensus
Wikipedians tend to be left-leaning but also tends to have strict editorial standards that make it easier for academics to thrive than it is for others, and since people who don't agree with a Wikipedia definition can change it, definitions for very common words like "woman" tend to have by now reached some level of "democratic convergence" even if the word's meaning has come into question in the last couple years. To my surprise just now, the definition that Matt Walsh gave Piers Morgan, which I felt was circular, is actually the surviving first line of the Wikipedia article for "Woman", but it isn't "circular" because we can click on "female" and see that in general they do not define it by chromosomes but by the ability to produce an egg cell, and specifically for humans the article about XXYY syndrome gives the clearest definition I have found so far:
"The appearance of at least one Y chromosome with a properly functioning SRY gene makes a male."
Based on that definition, not even the Y chromosome makes you a male, if you have a mutation on the SRY region of the Y chromosome, and in theory someone without a Y chromosome but with the same sequence of SRY nucleotides on a different chromosome, could be considered a male, but this type of extremely rare scenario is not what interests most people that ask the question "what is a woman?". At least one group (Wikipedians, based on fairly high standards for citations to primary resources by scientists, anthropologists, etc.) seems to have consensus on a definition that assigns "male" to anyone that has a functioning SRY gene on a Y chromosome, including:
- XY
- XXY (which happens in about 1 of every 2000 to 4000 live berths)
- XXYY (which happens in about 1 of every 36,000 to 80,000 live births)
- XXXY (which happens in about 1 of every 100,000 live births)
- XXXXY (which happen in about 1 of every 170,000 to 200,000 live births)
- XXXYY (which happens in less than 1 of every 1,000,000 people)
- XYYYY (which happens in less than 1 of every 1,000,000 people)
- XYYY
- XYY, and
- any other combination that contains a Y chromosome as long as the SRY region of it is functioning.
Their definition of a female is anyone that does not have a functioning SRY gene, so virtually everyone without a Y chromosome would be ruled out, including people with X, XX, XXX, or any other combination not including a Y chromosome, is a female.
However, the Wikipedia article Female also says:
"In humans, the word female can also be used to refer to gender in the social sense of gender role or gender identity."
As you can probably tell, I'm a scientist and have been trying to take as rigorous of an approach as possible here, but I do think it's fair for a word to have more than one definition (just look at any word in any dictionary and you'll likely see more than one definition), and Wikipedia is often not right but in this case seems to be spot on by saying that it depends on the context of whether you're interested in the biological definition or the sometimes-used (but increasingly so) social science definition.
If you will accept the second definition
The first definition of woman (adult human without a functioning SRY gene) is quite clear, as things in the hard sciences like biology usually are, so what about the "social science" definition?
This is my first time looking at any of these Wikipedia articles, but I again think that Wikipedia, over its years of edit wars and democratic path towards a consensus, has got this spot on in the Gender identity article:
"Gender identity is the personal sense of one's own gender."
As is common, the social science definition is not as clear as the hard science definition, but that is how it is and social science has its place in our world. According to this definition, if someone is "female" in the "gender identity sense" it means that they have a certain personal sense which is not defined in as clear of a way as physicists or biologists like to define things.
Note about biological definitions
Even hard science definitions change over time. The word atom is derived from the ancient Greek word "atomos" meaning "uncuttable", but we have "split the atom" into nucleons and electrons, and then nucleons into quarks, and we haven't detected these yet but there are theories that suggest that quarks are made of preons.
In biology, we didn't know about chromosomes until relatively recently. Before that the "definition of a woman" was probably "an adult human with a vagina" but when we discovered chromosomes the definition probably changed to "an adult human with the XX chromosome combination at location 23", but then we discovered that some people with the XY combination might not have a functioning SRY gene on their Y chromosome, which makes them grow into adults that fit much better with our notion of a "female" than "male", so the biological definition changed again, and it may change again.
What is a human?
This is not as easy of a question for biologists as the "common-sense" approach that Matt Walsh and others take. If you are reading this you are probably a Homo sapiens sapiens, which is a subspecies of the species Homo sapiens. There's also Homo sapiens idaltu (only discovered in 1997), Homo sapiens denisova, Homo sapiens heidelbergensis, Homo sapiens neanderthalensis, etc., but what precisely makes these Homo sapiens and makes Homo erectus or Homo habilus a different "species", and what makes Australopithecus afarensis a different genus, is not as precise or as common-sense as people would hope (I have worked on this topic, and this paper was the culmination of work from 2009-2015 and my preliminary studies that went further back). The definition of species that we learn in school: "organisms that can reproduce with each other" is too simple because the liger was created by mating a lion and tiger (thought to be different species, and still considered to be different species) and people thought ligers can't reproduce but in 1943 a liliger was born with one parent being a liger and one being a lion, and the liliger survived to adulthood (there are many other examples, not just ligers and liligers).
What is a mammal?
I love this one! We grow up thinking that non-mammals lay eggs and mammals store their offspring in a uterus, but monotremes are egg-laying mammals and many reptiles give live births via oviducts that consist of a uterus and vagina. It turns out that mammary glands aren't enough to decide whether or not a species is a mammal. In my sophomore-university vertebrate zoology class, at least at the time that I took the course, I was amazed to learn that what distinguishes mammals from non-mammals has to do with the form of three bones of the middle ear (the malleus, incus and stapes).
Consequences
I'll try to address your follow-up questions:
"if someone can just 'identify' as a woman then isn't that just putting real women down? If saying that men who think they are women can be a woman, then doesn't that diminish what a woman is?"
Some genetic women (people who lack the SRY gene) feel down about it and some advocate for it. As for people with the SRY gene identifying as women, the impact of that depends on a lot of things. As a powerlifter we have the following age categories: Sub-Junior (18 and under), Junior (19-23), Masters 1 (40-49), Masters 2 (50-59), Masters 3 (60-69), and "Open" (24-39). "Lifters of any age can enter the Open class" so a 17-year-old or 69-year-old can compete in the "Open" class if they want to but anyone between 24-39 must compete in the Open class (and cannot compete with 15-year-olds). Perhaps there can be a class that is only for people without the SRY gene (what I have been calling "genetic women") and a separate class for people that identify as women but may or may not have the SRY gene, and Lia Thomas would be allowed to compete in this "Open" class but not in the one that is only for people without the SRY gene (this is still not a perfect solution because hormone replacement is known to be able to affect athletic performance in both beneficial and detrimental ways, so hormone levels may enter the discussion for the most fair athletic competitions). Likewise, perhaps there can be washrooms for people without the SRY gene, washrooms for people with the SRY gene, and also rooms that are the equivalent to powerlifting's "open" category (many places already have these "gender-neutral" washrooms: large places like universities and airports have enough space for all three types of washrooms, and small places like mom-and-pop restaurants usually have just one gender-neutral washroom anyway).
Conclusion
A word can have more than one meaning:
In the context of genetics, a woman is an adult human without a functioning SRY gene (not having a Y chromosome basically guarantees this, and having a Y chromosome almost always rules this out). Even hard-science definitions change over time though, and some biologists may disagree with this definition, but it is currently the most common and accepted definition world-wide among geneticists.
In the context of gender identity, a woman is someone who has a certain personal sense which doesn't yet have a single, precise, definition (but neither do a lot of things in social sciences and even in the hard sciences words like "species" and "human" and "mammal" are still changing and not as precise as "neutron" vs "proton").