The "set" will set the value of the variable RedirectPage01 to what ever you put in between the quotes.
[string tolower [HTTP::host]] will covert the value of the variable HTTP::host to lower case. HTTP::host is a variable set by the F5 and it the value of the host header in the HTTP request.
([string tolower [HTTP::host]] equals "www.foods.com") will check to see if it is equal to www.foods.com.
([HTTP::uri] equals "/") will check to see if the URI is just plain "/", that is it is not "/somepage.html".
if { ([string tolower [HTTP::host]] equals "www.foods.com") and ([HTTP::uri] equals "/")} will check to see that both conditions are true and if they are both true the F5 will respond to the request sending the value of the variable RedirectPage01.
So if the host name is the check for host name will fail and the F5 will continue with any other logic in your iRule. If there is no other logic, then the F5 will pass the request through to the servers behind the F5 as configured.
If the hostname is but the URI is "/somepage.html", then the check for URI will fail and the F5 will continue with any other logic in your iRule. If there is no other logic, then the F5 will pass the request through to the servers behind the F5 as configured.