Not all varieties of Agapanthus are hardy, and withstanding winter can depend on where in the UK you garden. Parts of Hampshire and Southern counties are H3 which is acceptable to many Agapanthus, a lot of the North of England is H5+.
If you garden in an area which is subject to low temperatures, frosts and snow you can either bring Agapanthus inside or if there is no room inside, apply a mulch. A good thick mulch can see the hardier varieties of Agapanthus through the winter even in colder parts of the UK.
In the image above I left it a bit late to mulch, evidcenced by the snow. When is too late to mulch? This image is early January and if you have forgotton your Agapanthus, I would still mulch even in January and later because there is often more cold weather to come. We will not easily forget The Beast from the East.
To mulch, clear off as much snow and dead leaves as you can. Apply a thick mulch of 8cms, in the image I have used Strulch (of which I am a fan, its good stuff,) you can also use leaf mould, small bark chippings, organic garden material, straw or garden compost. Pack the mulch around the base of the plant but do not swamp the plant. You are tucking it in rather than covering it. The mulch can be removed in the spring, the good point about Strulch is it will rot down in situ and add to the organic matter in the soil.
If you are having problems getting your Agapanthus to flower, check out growing tips about Agapanthus and ensure they are growing in a sunny spot and fed regularly.