Coffee beans aren't beans. They are fruit pits.

Coffee beans aren’t beans. They are fruit pits.

Coffee beans are actually just the pit of a fruit called a cherry. These pits get roasted and ground into liquid that we drink for energy throughout the day. This liquid is flavorful and perfect for cold weather.

Source