How does Kafka handle time stamping? what is the configuration?

how does kafka determine timestamps for events?