Computation of interfacial free energies between coexisting phases (e.g. saturated vapor coexisting with liquid) is a fundamental problem of classical statistical mechanics: the standard approach (dating back to van der Waals, Ginzburg-Landau, Cahn-Hillard ...) is based on the continuation of the free energy of homogeneous states throughout the two phase coexistence region. Beyond mean field this continuation does not exist, nor does an "intrinsic profile" of the interface exist! These problems can be overcome by computer simulation: one popular method is based on sampling the order parameter distribution function in the two-phase coexistence region, which yields information on the surface tension of planar interfaces (from "slab configurations") and of curved interfaces (from states containing "droplets"), elucidating the problem of the "Tolman length". Another method (suitable also for solid-liquid interfaces) analyzes the capillary wave broadening or the capillary wave spectrum; all these methods require a careful assessment of finite size effects. Related problems occur for excess free energies due to walls, needed to describe wetting phenomena, capillary condensation, heterogenous nucleation, etc. As an example, a thermodynamic integration method (based on "mixing" systems with and without walls) will be described, and an application to understand phase separation in nanoconfinement will be mentioned.