YouTube algorithm is the algorithm used by the video platform to rank suggested videos in his recommended or related lists.
YouTube algorithm influences results for :
keyword search on YouTube
suggested videos on homepage
related videos on a watch page
suggested video on the player afyer at the end of a video
Many factors are taken into account by YouTube algorithm:
title and description of the video
tags associated with the video
clicks and click rate on the video results
ratings and comments
uploading date (age of the video)
relative viewing duration (viewing duration compared with video length)
overall viewing session (has the user seen other videos within a brand channel or playlist)
social sharing (especially video embedding)
Since 2012, YouTube gives less weight to clicks and views and more weight to engagement (viewing duration, ratings, comments, overall viewing session). This trend aims at fighting misleading thumbnails and views buying.
Optimizing a video for search on YouTube is also a way to optimize its rank on universal Google SERPs and on Google video SERPs, but it is only a part of video SEO.