After I work out/exercise, I get a severe headache. It' s painful and I feel like i' m going to pass out. Why is it happening and is it dangerous?

Maybe. Headaches can occur with exercise but if severe you need to see your doctor. This can be a sign of high blood pressure or other medical problems. I would get checked before continuing your exercise program.
Over exertion. This could be a case of over exertion and wearing down. Are you hydrating enough and allowing the body time to rest and recover. Supplements and nutrition are also important. Your immune system might be compromised at this point and a short rest may not be out of the question. If this lingers, time to see your doctor.