How keystore works

Hello, can someone explain me what is the purpose of the keystore and how can I configure it?

Which keystore? Elasticsearch keystore or TLS keystore?

Assuming you mean Elasticsearch keystore. It is used to store secure settings. You can refer to this doc page for how to interact with it using the CLI tool.