Hello
The brief and general answer to your question would be "it depends where you do your phd, and in what field/programme you are in" For some programs, it looks like this:
1. The first two years are usually when the students complete a coursework. This may be theory-focused, method-focused, or even writing-focused. Each course requires examinations, in which you get a grade. In some places grades are no big deal, publication is the big deal. I don't know how computer science phds do theirs.
2. Most students use the first two years to prepare their papers. So they compose their lit reviews, narrow down the research, etc...
3. After the first two years, you go the quals, or make your transer to continue to the followong years as a phd.
4. There's teaching work, assistantship work, etc...
5. There are conferences to be attended, with different schedules. Some conf occur in the spring, some in winter.
6. You do all these while you write your thesis. So writing up is your main work, and you do 1-5 as you go along.
Hope this is useful.