A few hundred thousand years after the Big Bang, dark matter slowly started to collapse by the effect of its own gravity. As this process proceeded to form the virialized structures that we call dark-matter halos, the increasing gravitational pull exerted by these objects began to attract baryons into their potential wells. These baryons will later cool and condense, forming the seeds of the galaxies that we observe today. This primordial link between the baryonic and the dark-matter components of the Universe motivates the notion that the formation and evolution of galaxies cannot be fully understood unless their intricate relations with their hosting halos are taken into account. In this talk, I will summarize my recent contributions to the field of the halo-galaxy connection, which I address from the perspective of theory, modeling, and observations. I will focus on the effect called secondary halo bias, which refers to the dependence of the clustering of dark-matter halos on their multiple internal properties. I will discuss the physical origins of these secondary dependencies and their potential manifestation on the galaxy population.