Subwavelength dielectric structures offer an attractive low loss alternative to plasmonic structures for the development of resonant optics functionality such as metamaterials. Nonspherical like rectangular structures are of most interest from the standpoint of device development due to fabrication convenience. However, no intuitive fundamental understanding of optical resonance in nonspherical structures is available, which has substantially delayed the device development with dielectric materials. Here we elucidate the general fundamentals of optical resonances in nonspherical subwavelength dielectric structures of different shapes (rectangular or triangular) and dimensionalities (1D nanowires and 0D nanoparticles). We demonstrate that the optical properties (i.e. light absorption) of nonspherical structures are dictated by the eigenvalue of the structures leaky modes. Leaky modes are defined as natural optical modes with propagating waves outside the structure. We also elucidate the dependence of the eigenvalue on physical features of the structures. The eigenvalue shows scaling invariance with the overall size, weakly relies on the refractive index, but linearly depends on the size ratio of different sizes of the structure. We propose a modified Fabry-Perot model to account for this linear dependence. Knowledge of the dominant role of leaky modes and the dependence of leaky mode on physical features can serve as a powerful guide for the rational design of devices with desired optical resonances. It opens up a pathway to design devices with functionality that has not been explored due to lack of intuitive understanding, for instance, imaging devices able to sense incident angle, or superabsorbing photodetectors.