Cyclic codes over finite field have been studied for decades due to their wide applications in communication and storage systems. However their weight distributions are known only in a few cases. In this paper, we investigate a class of $ p$-ary cyclic codes whose duals have three zeros, where $ p$ is an odd prime. The weight distributions of the class of cyclic codes for all distinct cases are determined explicitly. The results indicate that these codes contain five-weight codes, seven-weight codes and eleven-weight codes. Some of these codes are optimal. Moreover, the covering structures of the class of codes are considered and being used to construct secret sharing schemes.