WordPress allows theme and plugin developers to programmatically specify new, custom rewrite rules. The following functions (which are mostly aliases for WP_Rewrite methods) can be used to achieve this.
Note that these rules are usually called inside the init hook. Furthermore, permalinks will need to be refreshed (you can do this from your admin under (Settings > Permalinks) before the rewrite changes will take effect. Requires one-time use of flush_rules() to take effect. See also Flushing Rewrite on Activation.
API Reference
Articles
Lesson: Rewrite API Overview
Class: WP_Rewrite() - An overview of WordPress's built-in URL rewrite class.
Hooks
Filter: root_rewrite_rules - Filters the rewrite rules generated for the root of your weblog.
Filter: post_rewrite_rules - Filters the rewrite rules generated for permalink URLs.
Filter: page_rewrite_rules - Filters the rewrite rules generated for your Pages.
Filter: date_rewrite_rules - Filters the rewrite rules generated for dated archive URLs.
Filter: search_rewrite_rules - Filters the rewrite rules generated for search URLs.
Filter: comments_rewrite_rules - Filters the rewrite rules generated for the latest comment feed URLs.
Filter: author_rewrite_rules - Filters the rewrite rules generated for author archive URLs.
Filter: {$permastruct}_rewrite_rules - Can be used to create or modify rewrite rules for any custom permastructs, such as taxonomies or custom post types.