An 'Event' is something that happens.
The script you made is just a short script. If this script was made using the GUI, then it is stored in Domoticz's database. You can also put scripts in the domoticz/scripts/python directory.
Python support is fairly new. LUA support has been there for a long time, so my experiences are just based on LUA.
I wrote: "An 'Event' is something that happens."
So, for example, when you push a button on a remote control, or in the GUI, you cause an event and your script gets executed. But in in your script, there's no code that checks which event 'happened'. This probably causes this script not to be executed at all, no matter what events happen.
You should read up on 'Events' at
http://www.domoticz.com/wiki/Events and on the python example script in the GUI.
And:
In the GUI, setup, more options, events, just create a new Python script, do not change anything to the example script, Set it active and save it.
Then go to setup, log
Then cause some Events, for example, push some buttons on a remote control for your lights, or, whatever, and see what appears in the log. After that, start changing things in the example script.