Round-up will kill ferns but will also kill grass so it shouldn’t be used if the ferns are growing in a lawn or among other desirable plants (Round-up kills all plants). Read and follow the instructions on the package before using Round-Up.
If the ferns are growing in the lawn then a good lawn weed killer like Bonide Weed Beater Ultra will the choice. It will kill the ferns and other lawn weeds without harming the grass as long as it is applied according to the instructions on the package.