Definition of an Array: Arrays are ordered, integer-indexed collections of any object.
Definition of a Hash: A Hash is a dictionary-like collection of unique keys and their values. Also called associative arrays, they are similar to Arrays, but where an Array uses integers as its index, a Hash allows you to use any object type.
Arrays are used to display small bits of information in an ordered fashion. This is very basic and does not allow for any complexity. An example of an array is as follows.
produce = ["apple", "banana", "orange", "onion"]
As you can see, this list contains some produce. However, we should be able to say what kind of produce these items are. With Hashes, this is possible. Here is an example.
produce = {"name" => "apple",
"type" => "fruit"
}
or
produce = {"name" => "onion",
"type" => "vegetable"
}
Here you can see we can be more specific within a list and identify the type of produce an object is. This would make it possible to do such things as sort and organize our date in more than one way. In an array, sorting usually can be done with only one criteria in mind at a time. Haskes also allow for finding variable much quicker. Since I can use keys to do so instead of indexes. With an array, I would have to iterate over the entire array to find what I am looking for. That's a lot of wasted time. Hashes are great for finding data quickly.
As you may or may not know, there are many types of apples in this world. If I added them all to my hash, it would be much easier to find by the variety as well. Hashes allow for deeper sorting functions and many other things which I may discuss at a later time(when I know of such things).