If you have high-lead soils or are worried about lead in your soil there are a number of things you can do to feel safe about growing food in your yard.
Lead stays where it lands. So, if you have an older home with a high potential for lead paint, plant your vegetable garden away from your home drip line. The lead contamination is almost certain to be highly localized—right under your house. Move away from the drip line and you move away from the high-lead area.
If you live near a busy street, the easiest thing to do is to plant your garden a few feet away from the curb. The further you are from the street, the lower the soil lead concentration will be.
Till your soil. Because lead typically lands on the top of the soil, it’s likely that high concentrations will be limited to the top inch or two of your soil. Mixing the soil with a hand tiller will reduce the lead concentration by mixing the contaminated soil on top with the lower-lead soil on the bottom.
More aggressive options
Add fertilizers to your soil. Remember that urban soils are often neglected soils. Adding fertilizers, especially phosphorus fertilizers, will help your plants grow. Phosphorus will also bind the lead and make it much less dangerous over time. The EPA has tested adding phosphorus to Superfund sites as a way to take away the hazard while still leaving the lead in place.
Add composts to your soil. Most cities produce yard-waste compost. Many also produce compost made from the biosolids from wastewater treatment. These composts are regulated and can be a great source of both fertility and improved tilth for your soils. Some of these composts will also directly bind lead and make it less available. All will dilute the lead concentration in your soil.
Cover the bare soil around your garden with mulch. Remember: Bare soil is a much greater hazard than soil covered by plants or bark.
Most aggressive option
Build a raised bed and fill it with commercial topsoil (metals concentrations in these products aren't regulated, so be sure you aren't making matters worse here) or with compost, or a mixture of the two. You can also use landscape fabric to cover your existing soil as an extra safety precaution if you are really concerned. Raised beds are expensive to build and require a lot of soil or compost to fill them. But if this is what you need to feel comfortable, go for it.