how are textures mapped to models?

So I’m looking at this unity example game and I’m wondering, how does unity manage to apply an image like this:

onto a complex 3d model, like how does it know which parts of the image go onto which polygon?

What you are looking for is: UV mapping. You can start reading about it from here: UV Mapping