An introduction to infinite projected entangled-pair state methods for variational ground state simulations using automatic differentiation