According to Romans 8:9, every believer has the Holy Spirit living in them. And it should be understood that He wants to be the controller of each life and be a part of every activity, including prayer. Romans 8:26,27 tells us of the Spirit's ministry in our lives to help us to pray as we ought. So, to "pray in the Spirit" is to pray in fellowship with God's Spirit which implies that we are willing to pray under the Spirit's guidance praying for the things we should. We will want to pray according to the will of God and we will have an anticipation to see God's answers whatever they may be.
We are to pray at all times. "Pray without ceasing." 1 Thessalonians 5:17. We are to make prayer a habit of life in which we are constantly walking and talking with God. And that will lead us to pray "on every occasion" and in whatever situation we may find ourselves.
We will also do what Jesus said in Luke 18:1 to pray and not give up. Being "alert" is recognizing how in every situation we find ourselves we will take the opportunity to ask God for His guidance, protection, and wisdom. We will persist until we sense God's answer. And we will do this not only for ourselves, but we will be praying on behalf of our brothers and sisters in Christ. This gives Biblical grounds for taking prayer requests from others and praying for those requests.
Now, this admonition from Paul comes right after he has spoken about the Armor of God. It gives good grounds to say that the battle we are engaged in is primarily a battle in prayer. And that is why the armor is so important. (More to be said in another study). We are to fight against the enemy. Our armor is described in verses 11-17. Our strategy is in verse 18: PRAY!