办签证需要护照 passport is needed to apply a visa
吃这种药需要喝水 this medicine needs to be eat with water
In these cases, they both mean need or a demand
我要喝水 I want some water to drink.
我要买手机 I want a new mobile phone.
我要睡觉了 I am going to sleep.
In these cases, 要 means want to do something , want something or going to do something, it is often used with 想＝想要 want something or want to do something.