Following up on Yiannis' answer, I think you will feel the need to write a class instead of a package only if you work in a field that requires rather specific things which are currently not offered by standard classes and packages. So this would mainly apply if you are working in the humanities or social sciences, for which the main classes will be
classicthesis and some school-made classes.
If you need something more specific and that requires a lot of coding, including dealing with some internals, or if your layout parameters need to be loaded very early, you may want to create your own class.
For this, I would suggest you pick up a class you want to use as a base, then you can build on it. The easiest way is to create a class that will load it and then modify some of its macros. You will have to study the chosen class quite carefully (documentation and code) to find which macros you need to change in order to get what you want. To get you started on this, I would recommend Peter Flynn's article: "Rolling-up your own Document Class". He analyses the
article class, but the same would have to be done for any other class.
Then, on the more practical side of class writing, I suggest you have a look at "LaTeX2ε for class and package writers", which explains many things about the expected formatting of your class, how to create options, how to load another class, etc.
So your basic code would look like:
[YYYY/MM/DD v1.0 Description of your class]
% Create, execute and process options here, possibly with a key-value interface
% Insert any code you imperatively need before loading the class
% Modify the class here
Then, if you come across specific questions, someone of us will probably be able to answer them here.