Technically, cucumbers are fruit. In the world of botany, the part of a plant that develops from the flower and bears the plant's seeds are fruit, and cucumbers qualify on both counts.
On a technical level, the difference between fruits and vegetables is fairly clear. Fruits grow from a plant's flowers and contain seeds, and vegetables are the other parts of the plant. However in a culinary sense, there are plenty of fruits that are generally used as vegetables. These fruits include not only cucumbers but also tomatoes, eggplant, peppers, avocado and squash. These foods, while fruits by definition, are not nearly as sweet as fruits like oranges or peaches and fit in better with vegetables for culinary purposes.