A kitchen or bathroom is liable to have water on the floor, from spills or mopping. You can isolate the skirting from the floor by the thickness of a coin when you fit it. This will prevent water creeping up.
Not clear if you mean the wall is damp. If it is, there are various things you can do to find and correct the source of water. Oil-based paint, including primer (aluminium wood primer is very durable, usually for outdoor work like windowsills) forms a waterproof layer on the back, and, again, you can space the boards off the bricks using plasplugs in the wall and plastic spacers round the screws (these can also be used to compensate for a wall that is not flat and level). These spacers are sold on the woodwork shelves. I call them horseshoe spacers but this might not be the retailers name. Chip away the plaster behind, before fixing the skirtings, because plaster helps water to rise up a wall.
It is much easier and quicker to prime and undercoat slirtings before you fit them.
In older houses, you will find the boards for electricity meters and fuses are spaced off the wall with ceramic spacers. This is to prevent a damp wall from making the board rot. Especially useful in cellars, but it seems to have been done everywhere.