Start here. This is the direct spoken answer to practice first.
Why this question matters
Offsets are the event-stream version of message acknowledgement. The timing of a commit decides whether failures cause replay, duplicates, or lost work.
A consumer group is a set of consumer instances that share partitions from a stream. Each group tracks offsets so it knows how far it has processed. If a consumer commits an offset after processing, a crash before the commit can replay that event. If it commits before processing, a crash can lose work. I would usually commit after successful processing and make the handler idempotent.