Acrylic paint and oil paint are very different mediums when they're wet, but once dry, they're almost indistinguishable. There's no truly foolproof way (short of analyzing it in a lab) to determine if a painting was done with acrylic or oil. However, there are some distinguishing characteristics of these two mediums that can give you an educated guess.
Check to see if the paint is cracked in places. A fine network of cracks all over the painting is a clear indication that you're looking at an oil painting -- and an old one at that. Acrylic paint is relatively new onto the art scene. Dry acrylic paint is rubbery and smooth. As far as it is known, acrylic paint doesn't crack with age or yellow with time.
Examine the texture of piece. A highly textured painting with goopy areas of rough paint is difficult to achieve with pure acrylics, unless something has been added to the paint to give it a texture. Oil paint is naturally textured. In fact, acrylic paint usually shrinks and smooths as it dries so that the final product is often flat. If the piece you are looking at has noticeable brush strokes embedded in the dry paint, or if there is a rough texture overall, you are probably looking at oil paint. However, there are additives on the market designed to thicken and give texture to acrylic paint.
Make a note of the material on which the painting was created. Arylic paint is the paint of choice for painting on raw canvas. Oil paint should be painted on primed canvas because oil paint will degrade raw canvas over a period of many years. However, just because a painting has been done on primed canvas doesn't mean that the paint itself is oil-based. Most artists prefer primed canvas regardless of their medium, and some oil painters will paint on raw canvas regardless of the consequences. In addition, acrylics are a common choice for painting on T-shirts, shoes, backpacks and nonporous surfaces like ceramics.
Study the way the paint blends together on the canvas and the mixing of colors. Oil paint dries very, very slowly. This means oil paint blends more easily and without much effort from the artist. Acrylic paintings that have the same fuzzy, painterly quality as oil paints are usually a little more stiff and forced, even if only slightly.
Note the quality of the color of the painting. Because oil paintings blend so easily (and sometimes unintentionally) during the painting process, the colors in oil paintings are sometimes murkier than acrylics -- especially the colors on the top layers. Acrylic paints more easily and naturally maintain a sharp, vibrant quality throughout the painting.
If you're looking at a painting in a gallery or a store, there's likely some kind of label or an employee who can tell you who the artist was and what the medium was that the artist used.
Although acrylic and oil paint look very similar on a canvas, other mediums are much more easily distinguished from acrylic paint. Watercolor is typically painted on special paper and is a transparent, runny medium. Tempera paint is nonglossy, cracks easily and is not typically used on canvas.