There are some cruise lines (luxury brand) where all food and beverage and even gratuities are included in the cost of your cruise ticket.
On all of the the contemporary mass market cruise lines it is possible to eat in only the food outlets that are included in the cost of your cruise. But most also OFFER the choice of at least a couple options where there is an extra charge if you choose to dine there.
It's also "possible" to drink only free drinks onboard, such as tap water, iced tea, their regular coffee, some juices, etc. BUT.. again, if you choose there are other beverages available at an extra cost.
If you choose to consume those beverages, there is also a gratuity added to the cost of those drinks.
The cruise lines do their best to get you to spend extra on board; they offer several "packages" that cost extra, including soda packages, drink packages, and even alternate dining packages. But, those are all optional.