The peace that passes all understanding comes to us only when we are in the center of God’s will.  It is a peace unexplainable, a peace undeniable, and a peace that covers the whole of us.  It leaves no room for doubt or fear.  When God is in the plan, He gives us this
embrace of serenity and calm assurance that He is with us and is making the way clear before us.

Sometimes His peace comes before we see the answer to our questions or petitions, and that is a blessing akin to no other.  It is like being told a heavenly secret; we can wait and watch with high anticipation. We can be glad or relieved even as we wait for its fruition.  Other times, His peace flows over a matter immediately at hand, so that we may instantaneously know it is good, and it is from God.

Paul told us the way to attain such peace in Philippians 4:6:

Rejoice in the Lord.

Be gentle with everyone.

Do not be anxious about anything.

Put your need humbly and earnestly before the Lord.

Express gratitude to Him in all things.

(Paraphrased)

When we do this, the peace of God, which surpasses all understanding, will guard (our) hearts and minds through Christ Jesus.  Philippians 4:7 (NKJV)