Likewise the Spirit helps us in our weakness. For we do not know what to pray for as we ought, but the Spirit himself intercedes for us with groanings too deep for words. And he who searches hearts knows what is the mind of the Spirit, because the Spirit intercedes for the saints according to the will of God. And we know that for those who love God all things work together for good, for those who are called according to his purpose.
The "groanings" of the Spirit here should be related to the groaning mentioned in v. 23. That's why the verse starts with "likewise". It is not just us groaning expectantly (as in childbirth), but the Spirit likewise is groaning, and his groans as well are not in despair, but in hopefulness.
"Helps in our weakness" doesn't necessarily refer to the weakness of not knowing what to pray (although it is true not knowing what to pray is a result of our weakness), but the weakness of our current mode of existence under sin and death. We often do not understand the will of God as it relates to our weakness, but the Spirit does, and he intercedes for us and helps us in accordance with God's plan. This is the foundation for the great promise in v. 28 that "all things work together for good...." The Spirit is asking for God's will in relation to our good. He is interceding about ("helping us in") our weakness in ways that we don't know how to, and that is why we so often have circumstances ("all things") that we don't understand. Those crazy circumstances are the answers to the Spirit's intercession for us!!!