In simple terms, the State of Charge (SoC) provides information on how much charge is still available in the battery. In an ideal case, the SoC can be determined by measuring the charge drawn from and pushed back into the battery. A challenge arises since measurements are not fully precise, meaning the measurement of charge out and charge in might be different, just because sensors are not capable enough to count every change of charge. Also, not every charge which is inserted into the battery will be available later on to leave the battery again, since some processes inside consume charge via side reactions. Hence, the SoC needs to be determined by other means, not only by measuring charge in and out, but also by checking the resulting voltage.
The voltage measured outside at the battery is the difference between the cathode and anode potential. The cathode and anode potential is determined by the amount of lithium ions stored within the material. Therefore, one way would be to use a look-up table to check which voltage level corresponds to the amount of lithium ions stored in the battery electrodes, which then can be used to determine the SoC. However, the voltage itself is also affected by temperature and age of the battery. Other effects such as polarizations make the SoC determination only by voltage readings challenging as well.