What did he mean? How do we not fulfill the lust of the flesh?

St. Paul is speaking about our relationship to the Old Testament Law. On the one hand, since Christ has
fulfilled the Law, we are no longer bound to the ritualistic and legalistic aspects of it. On the other hand, this freedom does NOT mean that we are free to sin at will by indulging our baser instincts or by disregarding the needs of other people. Thus, St. Paul says:
"For you were called to freedom, brethren; only do not use your freedom as an opportunity for the flesh, but through love be servants of one another. For the whole law is fulfilled in one word, "You shall love your neighbor as yourself." But if you bite and devour one another take heed that you are not consumed by one another. (Gal. 5:13-15).
In other words, we still need to keep the true spirit of the Law: love for God and neighbor.
But, without specific guidelines (like those contained in the OT), how do we know what constitutes behavior according to the spirit of the Law? By the inspiration of the Holy Spirit! That's why we must "walk in the Spirit."
How do we know we are walking in the Spirit? Because such a life will produce the fruits of the Spirit: "love, joy, peace, long-suffering, gentleness, goodness, faith, meekness, and self control" (Gal 5: 22-23).
We avoid fulfilling (or doing) the lust of the flesh not out of mere obligation or by means of our own human strength, but through the assistance and grace of the Holy Spirit, whose help we entreat and whose presence we experience within the Church.