There are plenty of tools that will let you accomplish this.
Version control software such as subversion, mercurial, and Git will all accomplish this task. Git is currently the most popular of the three.
Depending in if you care about keeping to code private, the simplest path forward would be to create a repository on GitHub (private repo's cost money) or BitBucket (allows private repos for free accounts).
If you don't want to involve a 3rd party then you'll need to setup a repository on a computer that both you and your collaborator can access.