Pergunta de entrevista da empresa Microsoft

What is the difference between a clustered index and a nonclustered index? How do you optimize this given for loop?