Some people say to make sure to warm up properly, which is good advice. Let me give you better advice. Make sure the muscles your stretching are on FIRE from warming up. This helps to prevent injury during the deep stretching you'll be doing to get the double lotus, full butterfly, and eventually foot behind the head type flexibility. It also hurts a lot less when you stretch with warm/hot muscles. You'll be able to get the stretch much deeper and more comfortably than stretching cold. As a rule of stretching cold, never, ever ever do it. You're just tearing muscles and possibly injuring yourself.
Trust me, you don't want to be in this guy's situation.