Contraction vs gas

How do I tell the difference between a contraction and really painful gas?