The Parable of the Wise Virgins (Matt. 25:1-13) is one of two parables that the Lord Jesus spoke to His disciples in Jerusalem, shortly before His arrest. It follows a series of prophecies concerning the beginning of the end times, spoken in an open and clear way, so that the Jews would hear and understand. However, according to Matt. 13:12-13, when the Lord spoke in parables, it was so that only His followers would understand. This implies that the content of the parables concerns the church.
The parable starts with 10 virgins, taking their lamps and going forth to meet the bridegroom. Ten is the major part of twelve (see Gen. 42:3-4, 1 Kings 11:30-31 and Matt. 20:24), which signifies that this parable concerns the majority of the believers, those who have died before the Lord's return (the remaining two are the man working in the field and the woman grinding at the wheel, who are raptured while alive at the Lord's coming in Matt. 24:40-41). 2 Cor. 11:2 likens the believers to virgins, while the lamp signifies our bearing of the Lord's testimony, for which we need the filling of the Spirit, signified by the oil. The bridegroom, of course, is Christ, the most attractive and pleasant Person in the universe (John 3:29, Matt. 9:15).
Five of the virgins were prudent and brought with them vessels of oil; the number five is composed of four plus one, signifying that man (signified by four) with God (signified by one) added to him bears responsibility. That five virgins are foolish does not imply that half of all believers are foolish; instead, it implies that all believers must bear the responsibility for being filled with the Holy Spirit.
In verse 5, we see that the bridegroom delayed - the Lord has still not returned - and while waiting for His return, the believers eventually "became drowsy and slept" i.e. died. However, the cry goes out at midnight, "Behold, the bridegroom! Go forth to meet him!", which refers to the resurrection of the dead believers at the time of the great tribulation, as prophesied in 1 Thess. 4:16 and 1 Cor. 15:52.
However, the foolish virgins did not have sufficient oil in their vessels for their lamps i.e. they had not paid the price sufficiently to be filled in spirit during their lifetime, and so even after their resurrection, there is the need for that price to be paid. That the prudent virgins would not share their oil with the foolish implies that we cannot be filled in spirit on behalf of others. While the foolish virgins represent believers who are regenerated with the Spirit of God and indwelt by the Spirit of God, just as the prudent ones are, they have not been sufficiently filled with Him to have their whole being saturated with Him.
Instead, they are advised to go and buy oil, in other words to pay a price for the filling of the Spirit. Such a cost includes giving up the world, dealing with the self, loving the Lord above all, and counting all things loss for Christ. Those who sell the oil refers to the two witnesses, the two sons of oil, referred to in Zech. 4:11-14 and Rev. 11:3-4, being Moses and Elijah.
But while they are filling their vessels, the prudent virgins are raptured, because they are ready and they are watchful, and during their life, they paid the price to be filled in Spirit. They are admitted to the wedding feast, the 1000 years of the millennial kingdom, where they enjoy the presence of the King. The door behind them is shut so that the foolish virgins cannot enter. We should be clear that this refers not to the door of salvation - the foolish virgins have not lost their eternal salvation, but they do miss the 1000 years of enjoyment in the millennial kingdom. They miss their dispensational reward, but do not lose their eternal salvation.
This last point is quite crucial, and many Christians miss the distinction. In many places in the New Testament, the Word talks about the losing of salvation, where in other places it talks about eternal salvation. All Christians should be very clear - when they receive the Lord Jesus, they receive the eternal life, and will be saved from eternal judgement and eternal perdition. However, the other aspect of salvation is the dispensational reward, and that is only given to those who overcome, who pay the price to be filled in Spirit, who are watchful and prudent. Those who fail to meet that qualification are not qualified to enjoy the reward during the millennial kingdom, and instead will suffer some kind of governmental discipline during those thousand years, until they are matured. Then they will enter into the New Jerusalem for eternity with the overcoming believers and the nation of Israel.