what is difference between both the technology?
PIM-SM refers to PIM Sparse Mode. It is one of the modes under Any Source Multicast (ASM), where multicast streams can be received from any multicast source.
PIM-SSM refers to PIM Source Specific Multicast, where the receiver can specify from which source it wants to receive a given multicast stream. Unlike with ASM, which most of the time requires the configuration of an RP, SSM doesn't have the concept of RP, which makes things quite a bit easier. The only drawback is the requirement for the support of IGMPv3 on the receiver, which is not widely deployed these days. IGMPv3 allows the receiver to specify the source along with the multicast stream.
Hope this helps,