When someone tells you something or asks a question, but you weren't able to pay close attention to it because you were busy or distracted, you can ask this question.
There are a few versions of this question:
What was it that you were saying?
What was it that you were asking?
What was it that you wanted to talk to me about?
Notice that the phrase always ends with a verb that's continuous and past (were saying, were asking, wanted).