To install a script, put it into Support Files\Scripts\
directory inside AE installation directory.
To run a script, select it in the File
> Scripts
menu in After Effects. You need to restart AE for newly installed scripts to appear.
You can also run scripts without installation by selecting File
> Scripts
> Run Script File...
option.