First, you need to heat up the back and pry it off, being mindful of the fingerprint scanner cable and disconnecting it before completely removing the back. When you have your replacement back, you then need to place double sided adhesive along the frame to hold the back in place, put the fingerprint scanner in its hole on the back glass, and then gently line it up, plug the scanner back in, and then place the back on.
Please note, self-repairs are not recommended as this voids any existing warranties and any available accommodations Samsung could offer.
If you have insurance on your device, I would file a claim with them. Pay a very small amount, and they will replace the back glass at your house. Samsung can do it, but that'll require sending the device out. So, it depends on what your needs are. But doing it yourself is NEVER recommended. There's those ribbon cables that can snap, and other issues that can come about.