I am looking into writing a web service API and I am thinking of creating a REST service. What does OData means in this context? Can you please explain the difference between OData and REST?
REST is an architecture for how to send messages back and forth from a client to server using HTTP. OData is a standard championed by Microsoft that uses a REST architecture to send particular types of messages over HTTP. OData talks about what the messages look like (the content). REST is the architecture of how those messages get sent back and forth.
I agree with both @jkohlhepp and @Tom Squires, though will add a couple of details.
OData is an open standard (championed by Microsoft, but adopted beyond Microsoft, and available for many platforms, including iOS and Android).
OData payloads are based on Atom (read) and AtomPub (update) format. (As an aside, Atom is also the basis for a popular RSS feed format.) Atom is extensible, and OData has taken advantage of this to create well-known extensions. For example, with an OData service there are URI Conventions with many capabilities, such as filtering (filter by date, or customer name) and sorting and so forth. Using these special conventions in a standard (OData-defined) way makes OData powerful since they act similar and we can build tools to work against them and such.
There are some well-known OData sources available, such as by Netflix (all their movie data is there - can be fun to play with!).
Read all about OData at odata.org.
Good luck! -Bill