Licenses and Copyright

Who owns the code we write, and what are others allowed to do with it? We look at copyright, and how licenses let us share our work.