In this final project, we discuss the theory of Smoothed Particle Hydrodynamics (SPH) and its implementation in Matlab. SPH is a particle-based method for computational fluid dynamics. We apply SPH to study the time evolution of a toy star model and find its equilibrium state. The goal of this paper is to demonstrate the SPH works successfully, therefore we apply it to problems where analytic solutions are known to exist and compare numerical and theoretical answers. We also consider a toy collision problem of two polytropic bodies. SPH is found to give reliable answers and is a useful method for computational fluid dynamics.