Difference between clear, refresh and free

Even though clear, refresh and free are used in same context in ABAP, there is a difference between all three.

Clear is used to clear the contents of variables , work areas.
Ex: clear lv_test. 
We can also use clear to clear the contents of internal table by specifying [] in the end of Internal Table name.
Ex: clear it_mara[]. 
Just "clear it_mara." will clear the header line contents and not the body contents and hence if it_mara is a internal table without header line then no action will be done. So its important to specify [] if you are using clear to clear the contents of internal table.

Or we can use refresh to clear the contents of the body of IT.
Ex: refresh it_mara.
No explicit [] is requried.

Clear and refresh will clear the data stored but will not de-allocate the memory.
Free will de allocate the memory ( In simple words destroy the variable/internal table etc). It should be used only when you are sure that the variable will never be used after that point.
Ex: free it_mara.