An internship is usually a short term requirement to complete a certification, or level of education. It is a temporary position. Often unpaid (but definitely not required), Usually an intern is a student in the field who is looking for experience in the field before he/she seeks a job. Interns can be hired by a firm after the internship is over, but unlike a trainee program and internship is typically for a specific - short- period of time (say 3 weeks or 4 months).
A trainee is an official employee of the firm that is being trained to the job he/she was originally hired for. Literally an employee in training. Typically a lot firms will have a trainee period (2-3 months) where the person is still being evaluated after which an official decision to hire on a permanent basis is made. It is often used as a insurance measure by companies.