A topic is a named stream that producers send messages to and consumers read from. Kafka calls each message a record, and divides each topic into partitions, which are ordered logs spread across brokers.
The producer picks each record's partition. A keyed record goes to a partition chosen by hashing its key, so one key maps to one partition while the partition count is unchanged. A record without a key goes to a sticky partition, which changes once at least batch.size bytes have gone to it.
Partitions bring these benefits:
Several consumers can read a topic in parallel.
Records spread across brokers.
Order holds within each partition, though not across partitions.
A topic scales out as you add partitions and brokers.
For example, a topic user-events with 3 partitions stores records in partitions 0, 1 and 2.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.