Slug is a short name for WordPress post. It looks like this-is-your-post-title. One of the applications of posts is in permalinks. Having post title (or part of it) in the link makes the URL slightly longer, but much more easier to identify.
Now, sometimes people tweak the way slugs are structured. Or people import posts from unsupported blogging systems and forget to make slugs. Regenerating slugs for all posts in the database is very easy and does not require any scripting at all! After importing your posts (or tweaking the slug generation mechanism) simply run the
upgrade.php script, which is in the WordPress
wp-admin folder. That’s it!