Any article with more than three headings automatically gets a table of contents (TOC). The TOC is placed above the first section heading. All text above the first section heading is commonly referred to as the lead section. Depending on the overall length of the article, this introduction should not exceed one to four paragraphs in length and should summarize the article's key points.
If you do not like the TOC placement in an article, you can move it by inserting __TOC__ where you would like it placed. If you do not want a TOC on a particular page, add the text __NOTOC__ anywhere on the page; if you, personally, do not like the TOC feature, you can disable it in your user preferences.
When you transclude a page (that is, automate the display of a page's content on another page), all its tags (like {{TOCRight}}) go with it, which will be implemented on the host page. Just add the following code if you want to add a right-aligned TOC to a page, but do not want it to be displayed on "derivative" pages: