Mathematical analysis and numerical solutions of problems with unknown shapes or geometrical domains is a challenging and rich research field in the modern theory of the calculus of variations, partial differential equations, differential geometry as well as in numerical analysis. In this series of three review papers, we describe some aspects of numerical solution for problems with unknown shapes, which use tools of asymptotic analysis with respect to small defects or imperfections to obtain sensitivity of shape functionals. In classical numerical shape optimization, the boundary variation technique is used with a view to applying the gradient or Newton-type algorithms. Shape sensitivity analysis is performed by using the velocity method. In general, the continuous shape gradient and the symmetric part of the shape Hessian are discretized. Such an approach leads to local solutions, which satisfy the necessary optimality conditions in a class of domains defined in fact by the initial guess. A more general framework of shape sensitivity analysis is required when solving topology optimization problems. A possible approach is asymptotic analysis in singularly perturbed geometrical domains. In such a framework, approximations of solutions to boundary value problems (BVPs) in domains with small defects or imperfections are constructed, for instance by the method of matched asymptotic expansions. The approximate solutions are employed to evaluate shape functionals, and as a result topological derivatives of functionals are obtained. In particular, the topological derivative is defined as the first term (correction) of the asymptotic expansion of a given shape functional with respect to a small parameter that measures the size of singular domain perturbations, such as holes, cavities, inclusions, defects, source terms and cracks. This new concept of variation has applications in many related fields, such as shape and topology optimization, inverse problems, image processing, multiscale material design and mechanical modeling involving damage and fracture evolution phenomena. In the first part of this review, the topological derivative concept is presented in detail within the framework of the domain decomposition technique. Such an approach is constructive, for example, for coupled models in multiphysics as well as for contact problems in elasticity. In the second and third parts, we describe the first- and second-order numerical methods of shape and topology optimization for elliptic BVPs, together with a portfolio of applications and numerical examples in all the above-mentioned areas.