A tie connects two (or more) notes of same pitch.
The measures below are played in the same way:
As well as these:
The notes of tied notes can also be in different measures: