This is a seemingly simple question, but it has a very confusing answer. It's nunation and it's used in high Arabic (classical Arabic, in poems, in the Qur'an etc). When speaking, you would not use this ending. I would suggest reading up on it a bit just to understand, but don't worry too much about it yet at this level in Arabic. Good question!