In German, the article must be changed according to the grammatical case, this is called declination, eg.
'einen' is accusative masculine: Ich habe einen Computer. (Computer is masculine and the verb 'haben' requires the accusative case).
'einer' and 'einem' are both dative with 'einer' being feminine and 'einem' being masculine or neuter, e.g. ich helfe einer Freundin/einem Freund/einem Kind. (the dative case is required by the verb 'helfen'.