Hard plastic bit with sticky out end goes on the end of the cable outer.this then goes through your cable guide on the frame (if it will fit), rubbery boot thing then fits onto sticky out bit.
Use them for exposed bits of inner cable, so on my frame that would be where cable goes into downtube cable guide, then one at the end of the chain stay before run of outer goes into rear mech. Hope that makes sense.