Recall that a direct object in a sentence is the person, event, or thing acted upon by the verb.
In English, the direct object is placed where the original object was, however in Spanish the pronoun is placed in front of the verb, also replacing any article used with the object previously. Thus,
Spanish: Quiero este sombrero (English: I want this hat.)
Spanish: Lo quiero (English: I want it.)