If you want to contribute to the official development, which is highly recommended, you should go here and look at the unsolved bugs. You may clone the repository and make new features that isn't in that list, but be sure to chat with the other developers, and players, in #teeworlds-dev, to make sure you don't code anything they don't like.
If you just want to know how to compile the development version, which is the most stable one right now, follow this:
1. Download bam from here, take the development version, not any of the tags under Downloads, those are mainly for older versions of Teeworlds.
2. Extract it and run "./make_unix.sh" from the bam directory.
3. Go to your teeworlds-folder and do ../bam/bam config followed by ../bam/bam release, or server_release.
You need the SDL development libraries, Python and a compiler.