The UF in the wire means Underground Feeder which means that the UF B wire can be buried underground and it typically used for running electricity to Light Posts, water pumps, etc.
It's basically Romex Wire like that's used indoors but it's rated and made for burial underground and is waterproof.
You can use UF B wire inside as well but it's tougher to strip the insulation and less flexible but there's nothing wrong with using UF B wire inside.