Code search bar to show users and profile pics

Cant work out how to code the search bar to show all relevant users names and profile pictures when typing in a persons name.

Any help would be greatly appreciated