Can I just say "eu sunt cu ei"? If so, is there any difference in meaning between the two sentences?
It's sort of like saying I am (together) with them.
I put: I'm together with him at was considered a mistake.
I do not understand sometimes ei means them sometimes her. How to understand which one should I use?
"ei" only means "her" when "her" is possessive. Otherwise it means "they", "them" or "to her", so it's not too difficult to suss it out.
They are two different words, depends on context.
Why "I am with they " is not corect?
"they" is the subject form, "them" is the object form. Here, the word follows "with" (a preposition), so it's a prepositional object and not a subject.