http://technet.microsoft.com/en-us/library/jj219429.aspx This explains the process in detail. The process is slightly different depending on which office app you're building for. You can do task panes in... Excel, Word, Project and PowerPoint.
Here is a link to tutorials and samples... http://msdn.microsoft.com/en-us/library/office/fp142152.