If I understand correctly, you are replacing a single switch that has two wires.
You want to install a switch/plug-gfci similar to one shown below.
You are working on wires inside a box:
To wire this kind of device you need at least 2 cables entering the box.
Each cable has a black-white-ground wire.
Cable 1) One cable comes from breaker box. This is the
Hot cableHot cable has black-hot-from-breaker & white-neutral-from-breaker
Cable 2) One cable goes to the Load (light, fan motor). This wire is controlled by the switch. This is
the Load cableLoad cable has black-to-load & white-to-load.
Leviton combo GFCI and SwitchThere are 2 screws on either side of switch
There are 2 screws to either side of plug
There are two wires on back of device
2 screws on either side of switch: there is a brass-colored screw and silver-colored screw.
Black-hot-from-breaker connects to brass colored screw on side of switch
White-neutral-from-breaker connects to silver colored screw on side of switch
2 black wires on back of deviceBlack-to-load connects to black wire on same side of switch as brass-colored screws
White-to-load connects to black wire on same side of switch as silver-colored screws
2 screws on either side of plugThese screws are used when your box is a 'junction' box that feeds wires forward to another box ... for example you have 4 receptacles in a room, the cable enters first box and then goes to the next box and to the next box. Suppose your switch was one of the boxes. Wire arrives from a previous box (this is the Hot cable, every box has 1 Hot cable). Your switch box sends one cable to the Load (light, fan etc), but it also sends another cable to the next box which has a receptacle or another switch.
If your box has a third cable that feeds forward to other boxes, then the screws on either side of plug are used. The black-to-next-box goes to brass screw. The white-to-next-box connects to silver screw.
And all further boxes and devices are protected by the GFCI device.
If you need more information, please answer back and I will help.