In OpenGL you have model and view matrices combined into one modelview matrix. You should know such things before you start programming.

As for vertex operations - all vertices are processed using current state of matrices. Changing your matrix after you passed vertices makes no sense.
This is another thing you should know before writting OpenGL programs.

Read how OpenGL works before you learn programming it. There is no other way.

Conceptually view matrix affects all objects in your scene (your camera), and model matrix affects individual objects. In OpenGL they are combined into one modelview matrix, so here is what you could do:

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
// specify view matrix
gluLookAt(…);
glRotate(…);
// save view matrix
glPushMatrix();
// specify model matrix #1
glRotate(…);
// define object #1. The view matrix and the model matrix #1 affect this object
glBegin(…);
…
glEnd();
// restore view matrix
glPopMatrix();
// specify model matrix #2
glRotate(…);
// define object #2. The view matrix and the model matrix #2 affect this object
glBegin(…);
…
glEnd();
// restore view matrix
glPopMatrix();
// more objects
…