To create a Task in Gmail, simply open your email to one of your mailboxes. You will see either 'Gmail' or 'Mail' in the upper left-hand corner, typically beneath the logo. Click on 'Gmail' or 'Mail' to find the 'Task' menu item in the drop-down.

A box will open on the bottom, right-hand side of your screen. To add a new task, click on the big, bold PLUS ('+') sign. This will immediately allow you to type in a task name. 

Now, you can either press SHIFT+ENTER or click on the 'ACTIONS' option at the bottom of the task box. Here, you may Enter Details - meaning giving your task a due date and a note that defines what the task is that you are trying to complete and its due date.

You may also indent a sub-task (another 'Action' from the menu options at the bottom or you can go to the start of the name of the task and hit the TAB key. That will begin an outline for you.

To attach a task to an email, you can open an email message and in the 'MORE' menu of the email, there is an 'ADD TO TASK' option.

https://support.google.com/mail/answer/106237?hl=en