"친구는 공이 있습니다."
Translation:A friend has the ball.
It depends on how you look at it. Some languages say a ball is with or on the friend to mean that the friend has a ball. "A friend" is the topic, so it is like saying "As for the friend, there is a ball (with him)." only don't use that for an answer as that is just an idea of how the emphasis might work. They want us to translate the common Korean way of talking to the common English way of talking.
Korean doesn't use definite ("the") or indefinite ("a") articles like English. If you really want to designate a particular ball ("the" definite article), you have to use other means. Otherwise context usually makes it clear. Were we just talking about your favorite ball growing up? Then we are probably still talking about "the ball". Do we want to start a game of pickup soccer? Then we're probably just looking for "a ball."
This is the topic marker, which shows what the speaker is talking about. The topic is singled out as if you said “Regarding” or “As for” the friend, (he or she) has the ball.
This is not a definition. The friend has a topic marker, so it is more like “As for the friend, the ball is located (with him) which is translated to the common “The friend has the ball.” This is simply how they indicate location of items and ownership of items. The owner has the topic marker and the item has the subject marker if a location is given there is a marker for that as well. https://www.duolingo.com/skill/ko/basics-2/tips-and-notes
Friend has the ball works only if we are saying "Friend" is his name. "A friend" because we are not identifying a specific friend. I've seen in later lessons, that Duolingo allows "My friend" even though the possessive was not stated in the sentence. The idea I guess is that we are not talking about someone else's friend.
Oh, I forgot to say the clue is in the use of the topic particle for friend: As for the/a friend...