The subject of this thesis is the numerical simulation of viscous free-surface flows in naval engineering applications. State-of-the-art numerical methods based on the solution of the Navier-Stokes equations are used to predict the flow around different classes of boats. We investigate the role of the Computational Fluid Dynamics in the design of racing boats, such as America's Cup yachts and Olympic class rowing hull. The mathematical models describing the different aspects of the physical problem, as well as the numerical methods adopted for their solution, are introduced and critically discussed. The different phases of the overall numerical simulation procedure, from grid generation through the solution of the flow equations to the post-processing of the results, are described. We present the numerical simulations that have been performed to investigate the role of different design parameters in the conception of America's Cup yachts and we describe how the results obtained from the simulations are integrated into the overall design process. The free-surface flow around an Olympic rowing boat is also considered. We propose a simplified approach to take into account the effect of the boat dynamics in the prediction of the hydrodynamic forces acting on the boat. Based on the results of the simulations, we propose a new design concept and we investigate its potential benefits on the boat performances. One of the aspects that is found to be not completely satisfactory, within the standard numerical methods adopted, is the modelling of complex free-surface flows. The second part of this thesis is devoted to a more theoretical and methodological investigation of this aspect. In particular, we present and analyse a new numerical method based on the level set approach for the solution of two-fluid flows. The numerical scheme based on a finite element discretization is introduced and different critical aspects of its implementation are discussed. In particular, we present and analyse a new technique for the stabilization of the advection equation associated to the level set problem. Moreover, we propose a new reinitialization procedure for the level set function which plays a crucial role in the accuracy of the algorithm. The convergence properties of this procedure are analysed and comparisons with more standard approaches are presented. Finally, the proposed method has been used to solve a variety of test cases concerning time dependent two-fluid viscous flows. The results of the simulation are presented and discussed.