You can do this in two steps.
1 - Prepare your file
You need to create a CSV/XLSX file with two columns: a ‘document_code’ column for all the products you want to assign an attribute set to, and an ‘attribute_set_code’ column for the codes of the attribute sets to be assigned.
Once you have entered your product codes and attribute set codes in the file, save it and log in to your instance.
2 - Start your import
Click on the ‘Data Flow’ button, then on ‘Start an Import’.
Configure your profile as you wish (languages, empty cell action, etc.). The object type here is ‘Product’.
Configure the format of your file or leave the default values if they suit you.
Select the source of your file.
Enable mapping.
Match the mapping of your import to the columns in your file.
Finally, click on ‘Import data’.
Once your import has started, you can check its status in your instance's Activity reports.

