This phrase has multiple purposes:

1. Allows qualified agreement to a statement made by another person.

2. Allows the speaker to pretend he or she is listening to a complex argument when it is too boring for them to fully understand.

3. Allows the speaker to feign intelligence in a social situation where stupidity would be a kiss of death.

4. Makes the speaker seem thoughtful, if moderately indecisive.

5. A useful phrase when yeah, nah and uhhh are inappropriate.