For scalar and vector-valued elliptic boundary value problems with discontinuous coefficients across geometrically complicated interfaces, a composite finite element approach is developed. Composite basis functions are constructed, mimicking the expected jump condition for the solution at the interface in an approximate sense. The construction is based on a suitable local interpolation on the space of admissible functions. We study the order of approximation and the convergence properties of the method numerically. As applications, heat diffusion in an aluminum foam matrix filled with polymer and linear elasticity of micro-structured materials, in particular specimens of trabecular bone, are investigated. Furthermore, a numerical homogenization approach is developed for periodic structures and real material specimens which are not strictly periodic but are considered as statistical prototypes. Thereby, effective macroscopic material properties can be computed.