If you want to create your own distro completely from scratch, go to http://www.kernel.org and download the source code for the core Linux Kernel.
You might want to take a look at http://www.linuxfromscratch.org/ too, which will guide you through the steps required to build your own distro.
It'll be a lot of work, but you can create your own custom distro from scratch like this.
Otherwise, all Linux distros should have their source code available somewhere in their repos. So you could derive your custom distro from an existing one.
Fedora, Debian and Ubuntu seem to be common distros that are used as a base for derivatives.