How to determine if SQL Server will not execute parts of the script in parallel? Are there any general rules or maybe easy way to tell if SQL script will execute in batches instead of "all at once"? 

USE UserDB;
GO
DBCC SHRINKFILE (DataFile1, 5);
GO
DBCC SHRINKFILE (DataFile2, 5);
GO


Will it start shrinking DataFile2 only after DataFile1 has finished, or simultaneously?
GO


is a batch terminator in SSMS. Every time you have a GO (or a ;) you have told SQL Server that the batch just ended. So you are sending your commands in batches, and the batches are executed after another - not at the same time.

SO in this case they are all executed serially. Really anytime you run commands they are executed serially in one connection.

The bigger question in my mind is - Why are you doing Shrinkfile? I hope this isn't a production database? This is not a best practice operation to regularly be running at all, as this link describes.

Preview: Shrinking your data files shouldn't be needed - unless you just cleared a ton of space you'll never grow back into, are having serious disk capacity issues or are doing something in dev - and even in these situations, there may be alternatives that are better for you.

Shrinking means introducing index fragmentation. It means some expensive IO operations and there is a good chance you'll be growing back into the space eventually anyway if your database is still live and in use with inserts and updates.