She gave them a few apples.

Literal

She [topic-は] them [to-に] apple [object-を] some gave.

いくつか ('some, a few, several') is a quantifier built from いくつ ('how many') + か (uncertainty/some marker). It often floats as an adverbial between the object and the verb (りんごをいくつか) rather than attaching directly to the noun (いくつかのりんご is also valid but slightly more formal). The polite ~ました ending and 与える together give a slightly stiff narrative tone.