In this tutorial, we will see what is a task and its different states. Later we will see how to create a FreeRTOS tasks and finally we will write a simple example to see how the task works and task switching happens.