I'm a bit confused. I know that "go to university" is a collocation which means going to attend university. What if I want to say that I'm heading to, walking to, the university. Can I say "I'm going to the university tomorrow morning"?
Yes, you can use the, if you go there not as a student. There is great explanation in Raymond Murphy's "English grammar in use" (unit 74 A, B):
Compare school and the school:
- Ellie is ten years old. Every day she goes to school. She's at school now. School starts at 9 and finished at 3.
We say a child goes to school or is at school (as a student). We are not thinking of a specific school. We are thinking of school as a general idea - children learning in a classroom.
- Today Elle's mother wants to speak to her daughter's teacher. So she has gone to the school to see her. She's at the school now.
Ellie's mother is not a student. She is not 'at school'. She doesn't 'go to school'. If she wants to see Ellie's teacher, she goes to the school (=Ellie's school, a specific building).
We use prison (or jail), hospital, university, college and church in a similar way. We don't use the when we are thinking of the general idea of these places and what they are used for.
- Ken's brother is in prison for robbery. (He is a prisoner. We are not thinking of a specific prison)
- Ken went to the prison to visit his brother. (He went as a visitor, not as a prisoner.)
- Joe had an accident last week. He was taken to hospital. He's still in hospital now. (as a patient)
- Jane has gone to the hospital to visit Joe. She's at the hospital now. (as a visitor, not as a patient)
- When I leave school, I plan to go to university/go to collage (as a student)
- I went to the university to meet Professor Thomas (as a visitor, not as a student).
- Sally's father goes to church every Sunday (to take part in a religious service)
- Some workmen went to the church to repair the roof. (not for a religious service)
When we say "the professor went to the university to teach" we mean that he went to the university--as a building--and his purpose was to teach, in other words, when he (professor) goes to the university has a purpose as well as he is involved in the building per se, and obviuosly as a member. On the contrary, when we say "he went to university" we mean that he went there as probably a professor of that institution and evindently to teach.