How do patents and copyrights encourage innovation?

How do patents and copyrights encourage innovation?