There are numerous websites that host yearbooks from different schools. The biggest determining factors are publisher and if some classmates have taken it upon themselves to host the yearbook. No one answer fits every yearbook.
A good option is to search either the yearbook publisher website or to contact the school; some schools keep old copies of yearbooks, which would have the yearbook pictures. If it is recent, the publisher may have some back copies. If the photo was taken by a separate company than the publisher of the yearbook, as is often the case, they may have backups as well.