I look at being a ScrumMaster a bit like Caine from Kung fu, but without so much ass kicking.
Instead of going from town to town we go from team to team. We teach them, coach them, guide them and leave them when we're no longer needed.
This isn't the type of ScrumMastering that you're going to learn from a woefully inadequate 2 - 3 day certification course. This is what you're going to learn from practice, self improvement and others experienced in the field. That said, even if you're new to this, it's important to understand where your journey is going to lead you.
Firstly though we need to look at the primary roles of a ScrumMaster a little differently.
These are the ones I perform.
1) Guide the team towards self-organization.
2) Continually challenge the status quo and help the organization improve.
3) Help other ScrumMasters improve their practice.
Ultimately a self-organizing team will no longer need you. That's when you can walk away, head held high and say "My work here is done".