How would I go about making flying mechanics for a dragon?

For a starting point, the UFO in the Learn tab project Features tour 2014 has quite a good flying and hover, mechanics, you should check it out. Also, you can check out the Fish in the content example project to see that snake like wavy motion/ also the swimming motion.

I think those two projects will be a very good place to start.