Samsung mobile phones are one of the easiest phones to flash, this because of great support that samsung gives to this phones and a lot of tools.
To flash a samsung phone is recommended to download official rom firmware. There are a lot o websites to download samsung firmwaresm but the best is sammobile. In this website you will find a lot of roms, firmwares for all samsung types. Enter model type on section menu firmwares, Example sm-j100h, and then you will show rom for this type of phone from all countries, and photo ilustration of your phone to make sure that is your phone. Firmwares will be different types exmaple andorid 6.0 mashmallow, or 7.0 nougat etc. Download samsung usb driver, and then download odin lastet version. To download roms from this site is free, you don't have to pay anything for it, just you have to wait aboout 25 second and then you can download rom. First download and install samsung usb driver and then download samsung firmware, after you have downloaded firmware download odin.
And you are ready to start flashing of your samsung phone.
Now let's check another ways.
1 Samsung kies
There are some samsung types that you can flash it by samsung kies, and samsung kies 3 for some other types, this programs are two different programs but with the same name. Flashing with samsung kies you can make it by using emergency firmware update on secion top menu of program.