Confusion regarding SparkContext and Sparksession

Hello All,
I am new to Spark programming. I have some confusions regarding SparkContext and SparkSession.
When to create a SparkSession and when not?
When to create SparkContext and when not?
Is SparkContext required only to create RDD’s?

Though I know that for Sql, streaming and hive context we use SparkSession from 2.0.

sparkcontext if you just want to use spark…
sparksession…if you want sql above saprk…with spark…
i may be wrong…correct me