what is the difference between beans and seeds exactly?

and are coffee beans actually beans or are they seeds?

Coffee beans are seeds that superficially resemble beans.

True beans would be seeds of plants in the bean family (leguminosae) - this family also includes peas, lentils and peanuts.

I should add that the above is just the botanical view; in ordinary usage, it is quite acceptable to refer to other things as beans. Vanilla pods are sometimes called beans even though they are in the orchid family.
Coffee beans we have already covered (coffee is in the botanical family Rubiaceae - as are Gardenias.
Indian Bean Tree - this is an ornamental tree that has bean-like pods but is in the family Bignoniaceae - along with Jacaranda.

It’s also quite valid to refer to other things as beans:
-Those little ceramic beads that bakers use when blind-baking pastry cases
-Polystyrene beads used for stuffing soft furnishings (beanbags)
-Plastic beads used for stuffing soft toys (beanies)