When you believe in Jesus and his finished work, you receive his spirit. From then on it's your choice to be filled with the spirit. Being filled with the spirit is when you allow the Holy Spirit to come upon you to bear fruit and empower all the gifts. That's the bottom line, but let's look a little closer.
After Jesus' resurrection, he appeared to over 500 people over a period of 40 days. One appearance was to His closest disciples where he gave them His spirit. "And with that he breathed on them and said, "Receive the Holy Spirit." (John 20:22) Then he tells those same people to wait on the spirit to come upon them so they will be endued with power.