Well, it depends.
Scenario a) There is one book on the table that you want.
You would say: Can you give me the book on the table (or, can you pass me the book on the table, could you pass me the book on the table, could you give me.... and so on).
Scenario b) There are many books on the table, and you want to read one of them, but which one it is does not really matter.
You would say: Can you give me a book? (or can you pass me a book, etc. etc.) You would not necessarily need to say 'on the table' here. Although you might say 'can you give me one of those books that are on the table?'
The point being, 'the' refers to one specific thing: 'the book' 'the table'. 'a' refers to something more general. 'I'm going to go for a coffee' 'I want to buy a car' etc.