user1891: If I understand it right, a stale block is a block for which an earlier confirmation has been found and was accepted by majority of people. This block is considered invalid and is later never used.
But what is a orphaned block. How is it created? How is it verified that it is orphaned and what is done to the orphaned block?

user42882: Orphans are not in the chain (as seen by the processing node) because their parents are missing, stales are not in the chain because they have no children in the chain.
Source: the glossary at bitcoin.org:
stale blocks are:
"Blocks which were successfully mined but which aren’t included on the current best block chain, likely because some other block at the same height had its chain extended first." 
and orphan blocks are:
"Blocks whose parent block has not been processed by the local node, so they can’t be fully validated yet."

user516: Stale blocks:

At any second, a block may be "solved."  This means that everyone else
  in the world working on that block must stop, and restart their work. 
  Continuing to work after that point is known as working on a "stale
  block" because it is old data, and old transactions.

My understanding is the term stale is much more commonly applied to shares when mining in a pool, so you're more likely to hear about stale shares than stale blocks. In this case, the pool probably wouldn't even bother checking whether the share actually solved a block or not.
Orphaned blocks:

Detached or Orphaned blocks are valid blocks which are not part of the
  main chain. They can occur naturally when two miners produce blocks at
  similar times or they can be caused by an attacker (with enough
  hashing power) attempting to reverse transactions.

My own understanding is that orphaned blocks are initially accepted by the majority of the network, but are later rejected when proof of a longer blockchain is received that doesn't include that particular block. 
This means that a user could see a transaction as having one confirmation and then, if a longer blockchain was received that didn't include the transaction, it could change back to 0 confirmations. 

user208: There are several definitions with overlapping meanings.
The first is perhaps best called extinct blocks. These are blocks that were produced by building on a block that is no longer the active tip of the chain. Some nodes may have considered it to be the best block at some point, but they switched to another chain which does not contain the relevant block anymore. They are valid, verified, and their ancestry up to the genesis block is fully known - they're just not currently 'active'. They are sometimes called stale blocks (typically in the context of mining software realizing it built on old data) or orphan blocks. The latter name originates from the fact that payouts from extinct blocks are denoted as "orphaned" in the reference client (referring to the fact that their coinbase transactions are now orphaned).
However, there also exist real orphan blocks, with orphan in its original meaning of "having no parent". These are blocks received by a node that does not have its entire ancestry (yet) and thus cannot be validated. Nodes keep such blocks in memory, while asking their peers to fill in the gap of their history. The client does not show these, so when people talk about orphan blocks, they are most likely referring to extinct blocks. Note that since Bitcoin Core v0.10, there are no such orphan blocks anymore, due to a significant change in the download mechanism.
Terminology is confusing here :)

1891: <p>If I understand it right, a stale block is a block for which an earlier confirmation has been found and was accepted by majority of people. This block is considered invalid and is later never used.</p>

<p>But what is a orphaned block. How is it created? How is it verified that it is orphaned and what is done to the orphaned block?</p>
 42882: <p>Orphans are not in the chain (as seen by the processing node) because their parents are missing, stales are not in the chain because they have no children in the chain.</p>

<p>Source: the glossary at bitcoin.org:</p>

<p><a href="https://bitcoin.org/en/glossary/stale-block" rel="noreferrer">stale blocks</a> are:
"Blocks which were successfully mined but which aren’t included on the current best block chain, likely because some other block at the same height had its chain extended first." </p>

<p>and <a href="https://bitcoin.org/en/glossary/orphan-block" rel="noreferrer">orphan blocks</a> are:
"Blocks whose parent block has not been processed by the local node, so they can’t be fully validated yet."</p>
 516: <p><a href="http://btcvsltc.blogspot.co.nz/2012/10/stale-block.html">Stale blocks</a>:</p>

<blockquote>
  <p>At any second, a block may be "solved."  This means that everyone else
  in the world working on that block must stop, and restart their work. 
  Continuing to work after that point is known as working on a "stale
  block" because it is old data, and old transactions.</p>
</blockquote>

<p>My understanding is the term stale is much more commonly applied to shares when mining in a pool, so you're more likely to hear about stale shares than stale blocks. In this case, the pool probably wouldn't even bother checking whether the share actually solved a block or not.</p>

<p><a href="http://blockchain.info/orphaned-blocks">Orphaned blocks</a>:</p>

<blockquote>
  <p>Detached or Orphaned blocks are valid blocks which are not part of the
  main chain. They can occur naturally when two miners produce blocks at
  similar times or they can be caused by an attacker (with enough
  hashing power) attempting to reverse transactions.</p>
</blockquote>

<p>My own understanding is that orphaned blocks are initially accepted by the majority of the network, but are later rejected when proof of a longer blockchain is received that doesn't include that particular block. </p>

<p>This means that a user could see a transaction as having one confirmation and then, if a longer blockchain was received that didn't include the transaction, it could change back to 0 confirmations. </p>
 208: <p>There are several definitions with overlapping meanings.</p>
<p>The first is perhaps best called <em>extinct</em> blocks. These are blocks that were produced by building on a block that is no longer the active tip of the chain. Some nodes may have considered it to be the best block at some point, but they switched to another chain which does not contain the relevant block anymore. They are valid, verified, and their ancestry up to the genesis block is fully known - they're just not currently 'active'. They are sometimes called stale blocks (typically in the context of mining software realizing it built on old data) or orphan blocks. The latter name originates from the fact that payouts from extinct blocks are denoted as &quot;orphaned&quot; in the reference client (referring to the fact that their coinbase transactions are now orphaned).</p>
<p>However, there also exist real <em>orphan</em> blocks, with orphan in its original meaning of &quot;having no parent&quot;. These are blocks received by a node that does not have its entire ancestry (yet) and thus cannot be validated. Nodes keep such blocks in memory, while asking their peers to fill in the gap of their history. The client does not show these, so when people talk about orphan blocks, they are most likely referring to extinct blocks. Note that since Bitcoin Core v0.10, there are no such orphan blocks anymore, due to a significant change in the download mechanism.</p>
<p>Terminology is confusing here :)</p>
