Both cloud computing and grid computing are examples of distributed computing, which involves processing computing using remote resources over a network. The terms are sometimes used interchangeably, but the reality is that the two are different concepts.
The purpose of both grid computing and cloud computing are the same: to optimize the use of resources by pooling and sharing software and hardware. Both uses abstraction extensively, remain scalable, use multi-tenancy and allow multitasking. Abstraction is masking the actual and often complex processes that take place within the system, and providing the user with a simple and easy to use interface. Scalability is ability to vary computing loads as required. Multi-tenancy and multitask is the ability to perform many different tasks simultaneously.
The difference between cloud and grid rather lies in the architecture.
Grid computing divides a large task into many small portions, and executes the same on multiple machines, allowing for faster processing of tasks and optimal utilization of resources. Cloud computing also allows for optimal utilization of resources, but does not alter the fundamental architecture of the process. It offers the user many different services extending from hosting to web processing without having to invest in the architecture, and allows the user a choice of selecting the best and most relevant resource, but keeps the architecture intact. While allowing users to allocate different tasks to different machines or resources, it does not break up a single task and distribute the same to all available idle machines.
Cloud computing and grid computing are not mutually exclusive, and many organizations leverage both these concepts for best results. For instance, some organizations apply cloud computing to select resources under grid computing, and other ally grid computing within cloud computing to speed up tasks.
Cloud computing extends the possibilities for efficient resource allocation for businesses, whereas grid computing is a more sophisticated form of conventional cluster computing.