Place the contact lens on your finger so that a cup is formed. Then hold the contact lens up directly in front of your eyes so you're looking at the side of the cup.
If the contact lens forms a "U" with the top edges flared out, it's inside out. If it forms just a "U," it's in the correct position.
If you're wearing contact lenses with a handling tint, another way is to place the contact lens on your fingertip and then look down at it. The edge of a tinted lens should look very blue (or green, depending on the tint); that won't be the case if the lens is inverted.
Some contact lenses also have a laser marking, such as the brand name, on the edge to help you. If you can read it properly, the lens is not inside out.
Don't worry if you place a contact lens in your eye inside out. The lens will feel uncomfortable, but it can't do any damage.