Every file is owned by one user and one group, no more, no less. So when you create a file it will be owned by your user and current group. When a user logs in their current group will be their primary group.
A user can temporarily switch group to any of their secondary groups with sg or newgrp. The user can do this without having a the group password as long as it is listed as a secondary group for that user. While switched, files created will be owned by the new group, not the user's own
For permissions, primary and secondary groups are used together, there is no need to switch groups to access a file owned by one of your secondary groups.
Users can also change a file's group to any of their groups (primary or secondary) with chgrp.
In this sense, the primary group is little more than a "default" current group. Except that a user must have a primary group, there's no reason why they must have any other. This it is common to create a new group for every new user, that way the new user has no default access to other than their own user permissions.
From your question:
Assume there is a user A with primary group grp1 and user B with primary group grp2 and secondary group grp1. Then can they have the same permission as A for the files created by A ?
User B will have the group permissions assigned to files created by A. In this scenario, A is only creating files with grp1. User A can take away any / all permissions from the group.