Depending on what you want to do, you might want to have a look to see if any scripts already exist for it. I don't know much scripting, but what I do know, I have learned through doing. Have a look at some existing scripts, simple ones, and see if you can work out how each item does what it does.
I think there's also some scripting self-teach classes on here somewhere, I never worked through them myself, but it might be worth looking at as a starting point.