We study stability and Hopf bifurcation analysis of a model that refers to the competition between the immune system and an aggressive host such as a tumor. The model which describes this competition is governed by a reaction-diffusion system including time delay under the Neumann boundary conditions, and is based on Kuznetsov-Taylor's model. Choosing the delay parameter as a bifurcation parameter, we first show that Hopf bifurcation occurs. Second, we determine two properties of the periodic solution, namely its direction and stability, by applying the normal form theory and the center manifold reduction for partial functional differential equations. Furthermore, we discuss the effects of diffusion on the dynamics by analyzing a model with constant coefficients and perform some numerical simulations to support the analytical results. The results show that diffusion has an important effects on the dynamics of a mathematical model.