OpenHab adding values into a table to be visualized by Grafana

Not necessarily. Grafana is a separate program that can make charts based on data in a database. It works with InfluxDB among many other databases.

InfluxDB is a separate program that saves time series data. Basically, rather than a bunch of tables and columns, it stores a timestamp and value for each configured Item.

rrd4j is an embedded database available for OH. It stores the data similarly to InfluxDB except it only stores numbers and it decimates the data as it gets old so that the database never grows.

MapDB is an embedded database available for OH that only stores the most recent value for configured Items.

Use all three if it makes sense. See Design Pattern: Group Based Persistence. I personally use InfluxDB to store the data from the Items that I want to create charts and MapDB for restoreOnStartup.

InfluxDB is a separate program. See their docs for how to add data.