Specifically, it's written in a very early form of Sanskrit called Vedic Sanskrit, which is distinct from the later Classical Sanskrit used in literature and religious texts.
While the Rig Veda is the earliest known text in Sanskrit, it also provides us with valuable insights into the language's evolution.