TeXShop is provided under the GNU General Public License (GPL). This means that you are free to use, copy, and modify the program. If you give your modifications to others, the modifications must also be provided under the GPL.
The source code is available on the web site:
http://pages.uoregon.edu/koch/texshop/