Kneading builds the gluten network that holds the fermentation gases. By hand or by machine, what matters is when the dough is ready, not how long you knead.
Mix the ingredients roughly in the bowl until no dry flour is left, then let the dough rest covered for 15 to 20 minutes. The flour soaks up water in that time, and kneading gets easier afterwards.
On the counter, push the dough away from you with the heel of your hand, fold it back, give it a quarter turn and repeat. Don't add flour: if it sticks at first, it gets smoother as you go.
After 10 to 15 minutes it's smooth and elastic.
Start slow until everything comes together, then move to a medium speed. How long depends on the machine: a spiral mixer needs less, a stand mixer with a dough hook rather more. Watch the dough, not the clock.
Keep an eye on the dough temperature: it should end up around 24 °C (75 °F). If the dough warms up while kneading, it ferments too fast later. Colder water helps, and the water temperature calculator tells you how cold.
The windowpane test: stretch a small piece of dough thin between your fingers. If it stretches thin enough to let light through without tearing, the gluten is fully developed. For a dough that ferments long afterwards (a day or more), you don't need to knead that far: smooth and cohesive is enough, and a partial windowpane will do. The long ferment does the rest, and over-kneading makes the dough fight you when you shape it. Your recipe tells you how far at each step.
The surface is smooth and slightly glossy, and the dough springs back when you press it with a finger.
From about 70 % hydration, knead for less time and strengthen the dough instead three or four times during the first two hours: lift one side, lay it over the middle, turn the bowl and repeat all the way round.