While loop help

I'm trying to understand this code. I want to know when I execute the code how come this code outputs
"nameserver 192.168.168.2 search lan"?
There is no "cat /etc/resolv.conf" in the code so why does it output the content of the file?

#!/bin/bash
file=/etc/resolv.conf
while IFS= read -r line    # IFS : inter field separator
do
   # echo line is stored in $line
  echo $line
done < "$file"

you don't need cat /etc/resolve.conf .
You're read your input through: done < "$file"