Does your question refer to the case when the data is already present in a buffer, or when a new buffer has to be allocated?
The device block number comes from the device file this is used to mount the file system (something like /dev/sda1 in Linux or /dev/hd0a in BSD). The device number is needed whether buffers are used or not. The buffers are merely a cache to save time reading the same data again. The block number within the device is determined by the layout of the file system, read that part of the book for more information on the format of the file system. There is an explanation about directories, inodes, direct and indirect blocks and so on.
So once the kernel has determined which block is needed, it will look at the buffers in memory to find the needed block. If it is present, a read operation is not needed and the data is returned immediately.
If the content of theblock is not in memory, the kernel will select a buffer in the hope that the content of this block will not be used in the near future. This is usually the least recently used buffer.