Deadheading is the process of removing spent flowers that, if left, may turn into seeds and your plants will think their job is done for the season and stop flowering. You can tell a flower is spent when it no longer brings you joy and the petals have dropped, gone brown or are looking a bit frilly round the edges. The best thing to do is take a pair of scissors (or secateurs if you have them) and cut the stem below the dead flower head and above a leaf node (where the leaves grow from the stem). This should encourage new growth and new flowers. Some flowers still bring huge joy even though they have gone over, for example agapathus seed heads can still be magnificent and architectural and you may decide to retain them, particularly as agapanthus flower once in a season.