Praying in the Spirit can take two forms. One is the private prayer language that some people take from 1 Corinthians 14:2. In fact, much of this chapter is about speaking in tongues. However, many people who encourage speaking in tongues don't consider everything Paul says about it:
--speaking in tongues should be for the benefit of the church (14:12)
--speaking in tongues should be matched with an interpretation (14:13)
--you need to pray with your spirit and also your mind (14:15)
--it's better to pray five words with your mind than 10,000 words in a tongue (14:19)
So, if you're praying "in the spirit," but you don't know what you're saying, then your prayer life is out of balance.
That's where the second form of praying in the Spirit comes. The better way to pray in the Spirit is to ask the Holy Spirit to help you pray. In Romans 8:26-27, Paul says that the Spirit "helps us in our weakness." When we don't know what to pray for, the Holy Spirit "intercedes for us with groanings too deep for words." This is what it means to pray with your mind. You ask the Holy Spirit to help you pray, to give you understanding for those things you should be praying for.
Another passage to read is 1 Corinthians 2:6-16.
May the Lord bless you and give you understanding of His Word.