Fire up the Spark shell. This is straight from the Spark documentation:
./bin/spark-shell --master local[2]
You will also see the Spark shell referred to as the REPL. It is by far the best way to learn Spark. I spend 80% of my time in the Spark shell and the other 20% translating the code into my application.
Note: if the application is written in Java then the Scala spark-shell can load Java jars, then you can run your app and or methods from Scala.
Also, if you are using IntelliJ IDE, I would suggest you follow this tutorial.
If you want to know more about Spark, then do check out this awesome video tutorial: