If you don't already have the Pd sources, then read GettingPdSource. Once you have all of the sources and the patches are applied, you can start compiling. Try building the whole thing and see if it works for you. (If you want to build Pd-extended, then read BuildingPdExtended).
For building on any GNU/Linux distro, the basic commands are currently the same. The Makefile will create a tarball unless it finds the dpkg-dev tools. If the dpkg-dev tools are found, then the end result will be a .deb.
cd pure-data/pd/src ./configure && make
or if you got Pd core from SVN, you also need to generate the configure script with autoconf
cd pure-data/pd/src autoconf ./configure && make
It will then build for a while, then you'll see the binaries in pure-data/pd/bin. You can run them directly from there, or run make install to install it into /usr/local.
Mac OS X
Once you have all of the sources, then you can start compiling. Try building the whole thing and see if it works for you:
cd pure-data/packages/darwin_app make darwin_app_core
It will then build for a while, and it should end up with a Pd-extended.app in pure-data/packages/darwin_app/build. But this will be only the core Pd