Normally, you just put it back in to it's port then there should be 2 small white clips that hold it down. But can you please provide more information about your laptop like the model number of it so we could provide more accurate solution.
Usually you would slide it into place and use the plastic retainer clip to secure it. I don't see said clip in that picture, however, and it looks like the cable's tip is damaged(?).