You need to create a third table, referred to as a "join table".
users (
id,
name
);
groups (
id,
first_name,
last_name
);
groups_to_users (
user_id,
group_id
);
Then create an entry in the groups_to_users table for every group a user is a member of (or, you could say it another way, one entry for every user that's in a group). This is an n:n relationship (many-to-many). If you search for "database normalization", as I mentioned to you in an answer to a previous question, you'll learn all about this stuff.
If you want to get all of a user's groups, you'd do something like:
SELECT g.* FROM groups_to_users gtu
LEFT JOIN groups g ON gtu.group_id=g.id
WHERE gtu.user_id = :UserId
If you wanted to get a group's users, you'd do:
SELECT u.* FROM groups_to_users gtu
LEFT JOIN users u ON gtu.user_id=u.id
WHERE gtu.group_id = :GroupId