This thesis studies the formation and the internal structure of dark matter halos in standard and non-standard cosmological models. In a ﬁrst part, we present a group ﬁnding algorithm that accounts for the total collapsed mass of a halo in the sense of classical Press-Schechter theory. We show that such an approach is indispensable in order to make meaningful comparisons between results from numerical simulations and theoretical frameworks. In a second part, that consists of three individual papers, we investiga- te the formation, evolution and internal structure of halos in various non- standard cosmologies. The ﬁrst paper examines how thermal velocities of warm dark matter particles inﬂuence the density and phase-space density proﬁles of dark matter halos. We show that warm dark matter alone, alt- hough still an attractive candidate, is not enough to solve the core / cusp problem. The second paper studies the internal structure of galaxy-sized objects in generic cold + warm dark matter cosmologies. We quantify how the presence of a warm dark matter component leads to an imbalance between the warm to cold ratio locally and on average in the Universe; a fact that needs to be considered in dark matter searches. In the last paper of the second part, we show that a multi-dimensional small scale approach is a powerful method to set strong limits on the nature of dark matter. In the third and last part of the thesis, we again return to a standard cold dark matter cosmology and investigate the smallest structures that form in a hierarchical bottom-up scenario: Earth-mass microhalos. A detailed study of the very inner density proﬁle reveals the slope to be considerably steeper than their larger counterparts. Based on this result, we compute the change in the total annihilation luminosity boost factor, a quantity of great importance for indirect dark matter detection.