How to create and execute own MethodSCRIPTs?

Hi 

How can I create and execute my own custom MethodSCRIPT code?

Thank you