Hi and welcome to LQ.
The code you've posted executes a while loop taking input from the ls command. This is a method to read a block of text line by line and execute some actions over each line. More in details the ls command list the files in the current directory and pipe this list to the while loop. The backslash at the end of the line is not really necessary. In shell programming it simply means that the statement continues on the next line, but the pipe acts in the same way.
The while loop just reads the input and assigns every line to the shell variable "filename". The syntax is:
where the command in the code above is:
the IFS= is an assignment to an environment variable, whose value will be used just for the execution of the command itself, without affecting other statements. IFS is the Input Field Separator and its default value is space/tab/newline. The statement
just assigns the null string to IFS. This is a method to manage file names containing blank spaces. A little more clear now?