Usually you are using pooling layers inside these standard models and VGG16 uses them as well.
You can check if by printing the architecture via print(model).
These layers will decrease the spatial size of the activations (which can also be done in conv layers).
Also the activations will have a different number of channels, which is defined by the number of filters in each convolution.
The 25088 is the number of input features, as the last activation, which is passed to the first linear layer has the shape [batch_size, 512, 7, 7].
For more information about convolutions etc. I would recommend to take a look at CS231n - CNN 5.