Is it better to get a fixed rate mortgage or adjustable rate?

I’ve heard you can get a low rate initially on an adjustable rate but then it jumps up. But I also heard there is a cap on how far it can go and it works out better. How do you choose?