Oil filter sockets work in exactly the same way as standard sockets, by attaching to a turning tool via the square drive socket, which is usually a ⅜” drive. Once attached to a turning tool, the head end of the oil filter socket fits over the oil filter cap in order to turn it. For more information, see: How to use a socket with a ratchet wrench?
Please note: You should not try to over tighten oil filter caps, especially if they are made of plastic. Doing this could strip the plastic threads from the cap and prevent it sealing correctly.