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