To confine something to a particular place or group means to prevent it from spreading beyond that place or group.
If you confine yourself or your activities to something, you do only that thing and are involved with nothing else.
If someone is confined to a mental institution, prison, or other place, they are sent there and are not allowed to leave for a period of time.