Most plants stop producing flowers once they set seed so the idea of dead heading is to stop that process so the plant goes on flowering. With most annual bedding plants you do this by nipping off the flower heads as they go over before the seed heads have a chance to grow.. Really important to do this for plants in hanging baskets and pots because they are under strain anyway so their natural tendency is to set seed as fast as they can, if you keep Feeding, watering and deadheading your hanging baskets will look a lot better for much longer.
With roses it’s a better idea to cut ( use sharp secateurs to avoid damaging the plant) the stem down to above a healthy leaf. Some roses, will only flower once in a season, but others are more free flowering.
Bushy perennial herbaceous plants like cranesbills will grow back and re flower if you cut them back quite hard. You can be smart about this, by cutting the furthest away from the front part of the plant, leaving the front, the front will flower, then you cut that back , by which time the back part has grown up. Then by the time that has stopped flowering the front has grown again. So the plant looks good for longer.
If they are clearly individual flowers like marigolds , pinks etc then just nip off the flower head as it goes over.
Be careful not to get carried away and take off the flower heads of things you want to keep for seeds because they look good , like sunflowers, honesty, teasels, thistles, agapanthus, allium.