In the present work, we study the deterministic spin dynamics of an anisotropic magnetic particle in the presence of a time dependent magnetic field using the Landau-Lifshitz-Gilbert equation. In particular, we study the case when the magnetic field consists in two terms. One is perpendicular to the anisotropy direction and has quasiperiodic time dependence, while the other term is constant and parallel to the anisotropy direction. We numerically characterize the dynamical behavior of the system by monitoring the Lyapunov exponents, and by calculating Poincaré sections and Fourier spectra. In addition, we calculate analytically the corresponding Melnikov function which gives us the bifurcations of the homoclinic orbits. We find a rather complicated landscape of sometimes closely intermingled chaotic and non-chaotic areas in parameters space. Finally, we show that the system exhibits strange nonchaotic attractors.