The student pilot’s improper fuel management, which resulted in a loss of engine power due to fuel starvation. Contributing to the accident was the pilot’s inadvertent switching of the fuel selector to the “off” position during the attempted engine restart.