Hi @Shrutii
As the name suggests, this activity is used to write codes/scripts making it possible to calculate values, exchange data between different tasks in the process and to execute specific operations using SOAP calls.
For more reference you can check the links.
JavaScript scripts and templates
Examples of JavaScript code in workflows
Regards
Akshay