Q. How many pages will be fetched to Memory?
As many as are needed for the query
Q2. How does server knows that the pages are related to a table?
In short, the allocation pages (or which there are many kinds) and the system tables.
Read Kalen's book, read Paul Randal's blog.
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass