The “book of life” is mentioned in Philippians 4:3 and in Revelation 3:5; 13:8; 17:8; 20:12,15; 21:27. It is called the “Lamb’s book of life” (the Lamb is Jesus) in Revelation 13:8 and 21:27. There appears to be no distinction between the “book of life” and the “Lamb’s book of life”. It is described as a book where the names of the faithful are written.
While the phrase “book of life” is not found in the Old Testament, the idea of a book where God has written the names of faithful people is found, for example, in Exodus 32:32-33; Psalm 69:28; Daniel 12:1; and Malachi 3:16. I think the book is symbolic rather than literal. The idea is that God knows who you are and what sort of person you are. If your name is in his book of life, then you have a place in his kingdom.