I see both "aquel" and "aquél" used in similar context and was wondering if there is any difference in meaning of those two words.
Aquel is an adjective whereas Aquél is a pronoun.
Aquel edificio es grande. -That building is large.
Aquél es grande. -That one is large.
Until 2010, the official rule was to use accent (tilde diacrítica in Spanish) to differentiate the pronoun from the adjective, as @snumpy has already said.
The (IMHO) sad news is that since 2010 the rules have been changed by RAE, and now it is recommended to avoid the use of the accent in this case, even when there is an obvious case of ambiguity:
Sólo / Solo:
Estaré sólo dos meses (I'll stay only two months).
Estaré solo dos meses (I'll be alone during two months).
Éste / Este:
Éste sólo gustó a los más exigentes (This one was only liked by the most demanding).
Este solo gustó a los más exigentes (This solo [Music] was liked by the most. demanding)
- In the first line, may be written with comma to avoid ambiguity: Éste, sólo gustó a los más exigentes.
Aquéllos / Aquellos:
¿Por qué compraron aquéllos libros usados? (Why did they buy used books?)
¿Por qué compraron aquellos libros usados? (Why did they buy those used books?)
- In the first line, the subject may be enclosed with commas due to the "hipérbaton": ¿Por qué compraron, aquéllos, libros usados?