The accuracy of finite-difference analysis in electromagnetics can be qualitatively improved by employing arbitrary local approximating functions, not limited to Taylor expansion polynomials. In the proposed new class of flexible local approximation methods (FLAME), desirable local analytical approximations (such as harmonic polynomials, plane waves, and cylindrical or spherical harmonics) are directly incorporated into the finite-difference scheme. Although the method usually (but not necessarily) operates on regular Cartesian grids, it is in some cases much more accurate than the finite-element method with its complex meshes. This paper reviews the theory of FLAME and gives a tutorial-style explanation of its usage. While one motivation for the new approach is to minimize the notorious "staircase" effect at curved and slanted interface boundaries, it has much broader applications and implications. As illustrative examples, the paper examines the simulation of: 1) electrostatic fields of finite-size dielectric particles in free space or in a solvent with or without salt; 2) scattering of electromagnetic waves; 3) plasmon resonances; and 4) wave propagation in a photonic crystal.