The “personal a” is sure one of those areas most students of Spanish struggle with. It is not that the concept itself is difficult to understand. The issue is that students, especially those that are less familiar with the topic, have to make a conscious effort to apply this rule of the language when needed.
The rule, referred to by some grammars as “personal a,” establishes at the very basics that the preposition “a” is mandatory to precede direct objects, when these are people or pets. In the sentence, La semana pasada visité a Miguel, the preposition precedes the noun - in this case a proper noun - because the referent of this noun is a person. But, when we translate this sentence into English the “a” has no translation at all! It is precisely because the addition of the preposition doesn’t per se add any meaning to the sentence, that students frequently forget the rule of the “personal a.”
But despair not! Gradually, through repetition, the dedicated learner will know when to throw in the preposition, without having to think about it much. The addition of the “a” when necessary should eventually become second nature.
But before reaching that level of internalization, there is some work to do. A first essential step is to get a good grasp of the syntactic functions that the different elements in a sentence have. A good grammar book is an indispensable tool to achieve this goal and every serious student of Spanish should procure one.
The syntactic categories that concerns us the most in the study of the “personal a” are those of subject and direct object; that is, of the entity that performs the action of the verb (the subject) and of the entity that directly receives or is affected by it (the direct object). From a syntactic perspective, the subject can be identified as the noun or nominal phrase that agrees with the verb; from a semantic perspective, as the element that is most active in a sentence.
Spanish lends us a hand when it comes to distinguishing between these two categories, as it is the “natural” position of the subject to precede the verb, while the direct object tends to be placed after the verb. In the example, El tigre devoró al cazador, the typical order is followed.
However, Spanish is quite flexible in regard to the order of the syntactic elements and, sometimes, subject and object may appear in the opposite order. Thus, a sentence like Espero a los invitados may turn into A los invitados espero, both sentences being grammatically correct, but the first one much more common. The selection of one form over the other usually responds to the expressive needs of the speaker/user within a contextual situation.
In cases where the “natural” order is reversed, it is common to duplicate the direct object through the use of the corresponding direct object pronoun. For example, A los estudiantes los entiendo bien, A Michelle todos la amamos.
Even though the preposition generally precedes personal or animated entities when these are direct objects, there are instances when the subject and object functions are performed by inanimate entities. In those cases, the preposition is usually placed before the object, in order to distinguish syntactic functions and avoid ambiguities. This is particularly true when the morphology of the verb is the same for both subject and object. For example, El adjetivo modifica al sustantivo. In these sentence, even though the “a” is not mandatory, some speakers will choose to add the preposition to best signal the accusative case, as both adjetivo and sustantivo are nouns in the third person singular, and therefore take the same conjugation of the verb modificar.
Another interesting use of the “personal a” is when an inanimate direct object is treated by the speaker as if it were somehow animated. For example, Luis extraña a su país, Luca ama a su bandera. In these examples, there is a degree of proximity/affection from the subject toward the object. In both sentences, the objects (país, bandera) are symbolically charged, and it is very frequent - although not mandatory - the presence of the preposition.
A last consideration should be made regarding certain verbs, such as tener or querer, whose meaning alters when used with or without the preposition. Compare for example, Gerardo tiene dos hermanos y Gerardo tiene a sus hermanos. The preposition is not mandatory with tener - even in cases when the direct object is a person - when it is a synonym of to have. In the second sentence the presence of the preposition slightly changes the meaning of the verb, which becomes a synonym of to count on. This becomes clearer if we add some elements to the sentence. For example, Gerardo tiene a sus hermanos cuando necesita ayuda.
Something similar happens with the verb querer. Compare for example, El entrenador quiere un nuevo delantero, El entrenador quiere a sus jugadores. In the first sentence, querer is used as a synonym of to want or to desire; in the second, querer is synonym of to love.
The previous considerations are not by any means comprehensive of the issue at hand, but are a good starting point for a better understanding of this particular phenomenon of the Spanish language.