If I read it right it looks like it is intended to strip off any surnames like Jr. Sr. III, etc from the original last name field and create a field called last name only that contains only the proper last name.
SELECT LName - selects current last name field
Replace(IIf(InStr(1, LName, " ") > 0 - INSTR will test to see if there are more than 0 spaces(the " ") in the LNAME field the 1 here means starting from position 1
Left(LName, InStr(1, LName, " ") - 1), This is the trupart of the IIF. If it finds a space then it is to replace with characters from the last name field up to the point of the space. So if InStr determined there was a space in character 10 then it would replace 9 characters. 10 -1 (theres your -1)
LName), ",", "") AS LNameOnly This is the false part if it finds no spaces then it will replace with the value of the LNAME field.