"Valid’ means that it actually was a Mass, including the consecration of the Eucharist.
If the person who said Mass was not actually a Catholic priest, or if the Words of Consecration were not used, or if the matter of the sacrifice ( bread and wine) were not used, then the Mass was invalid.
What was placed on the altar (bread and wine or cookies and milk) remain just that. There is no Eucharist, there is no Mass. The Mass would be invalid.
An invalid Mass does not fulfill the Sunday obligation, as it really isn’t a Mass.
A licit Mass is one in which the liturgical rubrics ( the laws of the Church) were followed. The correct readings were said, the correct ministers used, the prayers and responsed were the right ones etc…
And illicit Mass would be one where a valid priest presided, and the Eucharist was confected (the bread and wine became the Body and Blood of Christ), but elements of the liturgical law were forgotten or ignored.
It might be minor, such as the lector was on the wrong page and read the wrong reading for the day. It might be major, such as if the Eucharist in the species of wine was poured from a pitcher into cups.
A