Here is an example, taken from Symfony2 website, about defining a custom service (YAML notation):
services: newsletter_manager:
You can list services with
php app/console debug:container log
If you need more about some service you can use the help
php app/console debug:container log --help