Some traits need to refer to a type that the implementor chooses. An associated type is a placeholder declared in the trait and pinned down by each implementation. The canonical example is Iterator.
The Iterator trait
Iterator declares type Item; and fn next(&mut self) -> Option<Self::Item>. Each implementor picks what Item is — a counter yields u32, a line reader yields String. Self::Item in the signature refers to whatever that implementation chose.
Associated type vs generic parameter
You could imagine Iterator<Item> as a generic instead. The difference: a generic parameter lets a type implement the trait many times with different parameters; an associated type pins one choice per implementation. Since a given iterator yields exactly one element type, an associated type is the right fit — cleaner signatures, no ambiguity at call sites.
From<T>, implemented many times for many source types.Implementing Iterator
Implement next and pick Item, and your type instantly gains the whole iterator toolkit — map, filter, sum, collect — all as default methods built on your next. That's the require-little-provide-lot design from the defaults lesson, paying off in the standard library's most-used trait.