In this tutorial, I will only explain how to implement the filter. In order to get a nice configuration form for the backed you can follow http://drupal8cmi.org/drupal-8-hello-configuration-management , for example.
To keep it simple, I will just explain how to write a filter "foobar", that replaces foo with bar.
1. Getting started
Set up a Drupal 8 enviroment, start your favorite PHP editor and create a folder in the drupal 8 modules directory for the filter.
2. Inform Drupal 8 that there is a new module