letter
In German, the word 'Brief' is used to refer to a letter, whether it's a personal or business correspondence. It's used in a similar way to the English word 'letter'. For example, you might say 'Ich schreibe einen Brief' (I am writing a letter).
The letter arrived today
In this context, 'Brief' one more time stands for 'letter'. 'kam an' is the verb 'ankommen' in the past tense which translates as 'arrived'. The word 'heute' means 'today', so the phrase describes that the letter arrived today.
I am writing a letter
In this sentence, 'Brief' refers to a letter that one might send in the post. The verb 'schreibe' is the first person singular present tense of the verb 'schreiben', which means 'to write'. The 'einen' before 'Brief' is the accusative article showing that 'Brief' is the direct object of the sentence--in other words, it is the thing being written.
The letter is on the table
Here again, 'Brief' means 'letter'. The phrase 'ist auf' means 'is on', and 'dem Tisch' refers to 'the table'. Therefore, the sentence is stating the location of the letter - it is on the table.