Salam
I'll try to explain this in simple terms but you have to do your own research as well.
This is how I understood it and practice according to the Website which I will post.
1-) if you did something extra like praying an extra Rakat, you Prostrate twice AFTER saying your Salams and then say your Salam again.
eg. You figured you did something extra: 1-) Say your Salams 2-) Prostrate Twice 3-) After you are done with two Prostrations, say your Salams again.
2-) If you are not sure of something in your prayer , you Prostrate Twice AFTER your Salams and you do it the same way as the top one.
3-) I'll quote a part of the website for this
"Omitting an obligatory part of the prayer – such as if he omits an obligatory part and moves on to the next part of the prayer. For example, he forgets to say Subhaan Rabbiy al-A’la (Glory be to my Lord Most High).
Either he thinks that one or the other is more likely to be case, whether it is doing more or omitting something, in which case he should proceed on the basis of what he thinks is more likely to be the case, complete his prayer accordingly, then do the prostration of forgetfulness after saying the salaam;
Or neither appears more likely to be the case, so he should proceed on the basis of what is certain, namely the lesser amount, and complete his prayer accordingly, then do the prostration of forgetfulness before saying the salaam."
Im trying to make it simple for you to understand because I know you are new to all of this so I dont want to steep you with information overload. Note that there is no extra Tashahud when performing Prostration of Forgetfulness.
This is where I got my information if you wish to read from it:
http://islamqa.com/en/ref/12527
By the way its best if you try not to do it because they say if you are constantly doing Prostation of Forgetfulness
(it is called Sujud As-Sahw in Arabic by the way ) it is a sign that the evil one (Satan) is trying to mess with your head and your prayer.
Read it here , I find this post to be EXTREMELY beneficial and I HIGHLY HIGHLY recommend you read it and May Allah SWT Bless the person who wrote it and posted it.
http://www.turntoislam.com/threads/how-to-overcome-waswas-shaythans-whispers-in-worship.75934/
May Allah Bless you and Help you make things easy for you Insha'Allah!