Rui Martin has started a great blog post series on how to write a custom SerDe. The first post of the series, he provides the fundamentals as noted in the diagram below.
For more information, please review Rui’s great post: Hadoop/Hive – Writing a Custom SerDe (Part 1).