Let $Bbb F_q$ be the Galois field with $q$ elements, $Q_n$ a non-degenerated quadratic form on $Bbb F_q^n$, and $O_n(Bbb F_q)$ the orthogonal group defined by $Q_n$. Let $O_n(Bbb F_q)$ act linearly on the polynomial ring $Bbb F_q[x_1,x_2,dots,x_n]$. In this paper, we will find explicit generators and relations for the ring of invariants of $O_n(Bbb F_q)$, and prove that it is a UFD and a complete intersection.