Airfoil self-noise is the noise produced by the interaction between an airfoil with its own boundary layers and wake. Self-noise is of concern as it is an important contributor to the overall noise in many applications, e.g. wind turbines, cooling fan blades, or air frames, to name a few. The continued growth of available computing power has made direct numerical simulations (DNS) of compressible flows with application to airfoil noise possible. Challenges associated with such simulations and numerical details of a DNS code that is able to exploit modern high-performance computing systems are presented. Results obtained from DNS of flow over NACA-0012 airfoils at moderate Reynolds number are used to evaluate the accuracy of approximations commonly made in deriving trailing edge noise theories. The data are also used to identify additional noise sources present in airfoil configurations. Finally, DNS are employed to study the noise reducing effect of trailing-edge noise serrations, indicating that the noise reduction is mainly due to a changed scattering mechanisms and not a change in the incidence turbulence field.