"The boys have an apple."
Translation:Chłopcy mają jabłko.
What is the difference between chlopaki and chlopcy? Is it between little boys till the age of 12 and teenagers or which is the most common one in speaking the language or in writing ?
Chłopcy is more formal, more common is wriiten languge. Both forms are correct in lmost every context. The line between those two words is not clearly drawn. It depends who speaks about whom. But your explanation is close enough, I would stick to it.
i am really struggling to remember the spelling as I have never spelt in Polish..
Why is it failing 'Te' and asking me to write 'Ci' ? It is something grammatical?
Yes. "Chłopcy", as a "group of people including at least one man" - or even only men, is masculine personal. The masculine personal version of the pronoun 'these' is "ci".
And now a fun fact. If you use "chłopaki", which would suggest that the boys are teenagers, then it will be not masculine-personal (using the pronoun "te") for absolutely no logical reason at all. That's just an exception you have to learn by heart. Also "dzieci" (children) are non masculine-personal even if the children you describe are only boys. But "dziecko" (a child) is neuter, so that's the reason.