The Script component can be enabled or disabled using the toggle in the top right of the component panel. If enabled, all of the assigned scripts will have their update functions called every frame.
To create a new script, click on thebutton in the Assets Panel and select New Script. Then type the name of the script in the popup and hit Enter.
You can then drag the new script on a script component or you can click the Add Script button in the script component Inspector and then select it from the Assets Panel.
To edit the script in the PlayCanvas Code Editor you can either click on the hyperlinked script name, or you can select the script from the Assets Panel and click Edit.
The Script component's scripting interface is here.