"Lo" in this sentence is the equivalent to the "what" in the translation. "Lo" is followed by a "que" (which in this particular case does NOT translate into 'what'. It actually can't be translated because it doesn't exist in english), when there is an action (verb) afterwards. Learners always find this word to be quite difficult, so I highly recommend you to google it and read the rules or usage.
As for your sentence; "he did not remember what happened to it", would translate to "no recordó lo que le pasó". Since you added something specific (it), the verb becomes reflexive. The problem is, that in spanish this sentence isn't as specific as the english one, because the subject (él) is 3rd person singular, and "it" is as well. That means that this spanish sentence could be translated into three different english ones: "...what happened to it" or "...what happened to him/her (someone that is not the original subject)" or "...what happened to him(self)". Only context would help you tell the difference.
This sounds horribly hard, I'm sorry :(.
"He did not remember what happened" could be said in two ways:
"...recordó lo que pasó" 'lo que' is actually what indicates 'what'.
"...recordó qué pasó" 'Qué' with accent means 'what' by itself.
"He did not remember that it happened:
- "...recordó que pasó" Notice that here, 'que' does not carry an accent.
This might sound tricky, but it really isn't that much, Since the last two translations I mentioned practically sound the same during speech, people will avoid constructing the sentence that way because it could lead to confusion (unless the context is obvious) and will tend to add more words or use a different sentence to make the message clear. So do not worry.