When do I need a contextual filter vs. a relationship? Can someone explain the functional difference between contextual filters and relationships?

I understand that a relationship is a table join, and a contextual filter is passing parameters to the view. Both adjust view data. How would you describe when each should be used?

I have been building complex views for a few months now, but sometimes I still don't have an intuition for what I need - I generally have to find a tutorial on exactly what I am trying to do, and I think it stems from not really understanding these two capabilities.



Edit: 

Thanks for all the answers helping to describe the SQL building. On that topic, I found this advice very helpful.
Just think of it terms of SQL: 


a 'relationship' is a JOIN on another table
a 'filter' (contextual or not) is a WHERE clause. 


'Contextual' just means the parameter comes from the current context, e.g. part of the URL, something in the session, etc