These are relatively small electrical switches ideal for touch sensors/bump sensors on robots.
They can be wired NC (Normally Closed) or NO (Normally Open), and can be salvaged from consumer electronics like Walkmans, Computer Disk Drives and others.