maybe stupid question, but how do you know?

(first time mom) I'm breastfeeding and my goal is to take it to a minimum of 2 years. Sometimes I see comments about babies that wean themselves before they're 1 year old. But how does the weaning happen? like gradually or just refusing to nurse on a particular day? How do you know it is weaning and not a nursing strike or that there is something else wrong that causes a dislike to nurse. I can imagine that it may be different after a year old when they are also getting more solids, but what about the first year when milk is still the main source of nutrition?