If you want to play with the language, I would recommend:
opam install utop
which will install a very nice interpreter for ocaml. Then you can do:
and start typing in OCaml expressions:
utop # 1 + 4;; - : int = 5
For compiling OCaml applications I would recommend the
dune build system.