Answer: This really depends on how high the sides are, if you envision filling it all the way, and what other amendments you will be adding besides soil. Usually you would thoroughly loosen the soil at the bottom of the bed, then work in about a six inch layer of good quality compost and an inch or two of coarse builders type sand (not the fine play sand). You could add even more compost if you have it, or old rotted leaves or other aged organic matter. By the time you have done that you will have fluffed it up and raised the soil level about 8 inches or more. This may be high enough since you do not necessarily have to fill it to the brim.
If you use organic mulch each season and also add more organic matter each year then you will gradually increase the volume of soil mix over time. (Try to avoid walking in it to avoid unnecessary compaction of the soil, too.)
A cubic yard is 3 x 3 x 3 feet or 27 cubic feet. If your box is 8 x 8 by 1 foot deep then you would have 64 cubic feet. So two yards would about fill it completely. I would not recommend using generic top soil for a vegetable garden as this is not a regulated or standardized material. Instead, I would go about it by improving the existing soil.
There is a calculator at the following page to help you figure out your cubic measurements (Look under mulch.)
in case it comes in handy.
Q&A Library Searching Tips