I know this question already has some "kind" of answer in documentations but they are too abstract for me. Most documentation I have seen on Drupal doesn't explain all the details of how to properly override a theme function, or maybe I don't understand.
My problem is that I need to change the output of theme function
theme('links__system_main_menu', ...), which is used in
page.tpl.php to print the content of the main menu. I don't understand how to make it done. Please explain me every step you take and why did you take that step.