Gray prototype type look when data is not loaded [on hold]

I have noticed recently that many sites use a gray prototype type look when loading data on page.

  • Exhibit 1- Google drive Exhibit 1- Google drive

  • Exhibit 2- Facebook facebook

  • Exhibit 3- Medium medium

Can some one explain what library is used for this effect and how does it work in principle? Is there a study/A-B test/research which suggests that this approach help in any way in keeping user engaged while content is loaded?