Cows are considered holy in Hindu religion, not India as a whole per se. North/East/West India are primarily Hindu-majority regions and thus you're highly unlikely to find any beef, except perhaps at dodgy places in Muslim-dominated parts of those towns. Dodgy places because in those three parts of India cow slaughter is frowned upon and you don't find organised slaughterhouses for cows.
While Southern India has its own conservative Hindu population which do not eat beef, it also has proportionally higher numbers of Christians and Muslims - historically because Christianity was brought in by sea traders. Beef is not as uncommon in South India and you will certainly find it some restaurant menu (typically ones that are not under a Hindu owner's management). This is generally in upscale restaurants or hotels bars with a significant foreign visitor clientèle.
You'll never find beef products in chain restaurants such as McDonald's, Pizza Hut, Domino's etc. (For instance, there's no Big Mac burger in Indian McDonald's restaurants; instead, they have a 'Maharaja Mac' which is about the same size but with chicken patties.) Chain restaurants across India are primarily owned by a handful of companies based in North India. This was somewhat of a big issue in 2001 when rumours spread that beef fat was used in making French fries. You might come across signs in restaurants to this day which state 'Beef and beef products not sold here'.
Since the availablity of beef is so restricted, I can't think of how you'd end up eating it in a public place. Nevertheless, it isn't illegal and if you do acquire beef then you can cook it in your own home too.
In state of Kerala, situation is totally different. A significant percentage of people, including Hindus eat beef. It is unlikely to find a non vegetarian restaurant not to serve beef. Likewise, Kerala style non vegetarian restaurant in other states will most probably have beef. It will be usually marked as meat only. For example, if you see 'meat roast', 'meat masala', read it as beef roast and beef masala. Ask discretely to waiter to confirm and enjoy. :) Best beef burgers can be found in burger places in Kochi and Thiruvananthapuram.
Update:
Wiki: "Legislation against cattle slaughter is in place throughout most states of India except Kerala, West Bengal, and states of the North-East".
Effective date: On 26 October 2005.