Leggy seedlings have long stems which look thin, and floppy. Your first thought maybe to bin them and start again. It is worth thinking again as it is an effort, and cost to germinate and disheartening to start again. Also, some veg seed packets, especially the large seeds such as cucumbers and the F1, only have a few seeds
It is sometimes possible to salvage weedy seedlings, and worth a try. Wait until the seedlings are large enough to handle and can be potted on. When replanting the seedling, sink it low into the new pot so that most of the leggy bit is below the soil surface. If you like, bury the mistake and often the seedling with grow on with no obvious problems.
Look at the series of images below.
The first image is of the leggy seedling, it's a courgette, and of a size that it can be potted on. Instead of putting it into the shallower pot, which may be the usual choice , in the second image, (grey pot) select a pot with greater depth. The next 3rd image shows easing the seedling out of the container it germinated in, and its healthy the root system is starting to establish, it is just a bit leggy.
The last image shows the seedlings potted deep into a container with only a little of the stem above the soil and it looks better. Give it a couple of weeks and it should grow on fine, if should it fail you have lost little other than some time and compost.
This method is particularly effective with tomatoes, which like to be re potted deep to encourage the root system and almost always grow on well after this treatment.
More information about How to Sow Vegetable and Flower Seeds
and 10 top tips on How to Germinate Seeds