Hi markr,
Plugin development is some pretty advanced stuff. If you don't have any other plugins to examine, download our free MySQL Console plugin to see how plugin "actions" work.
To access the "record_postsave" hook, you'll need to use addAction(). You'll also want to familiarize yourself with how the code which calls that action works.
Out of curiousity, what is it that you want to accomplish?
All the best,
Chris