Why does Bernoulli's equation only apply to flow along a streamline that is in viscid, incompressible, steady, irrotational? I am learning about hydrofoil on this website.
In a later video I watched, I learned that in the process of deriving Bernoulli's equation, $$constant=P/d+gh+1/2v^2$$ has to multiplied through by density. To keep the left side constant, fluid density has to be constant and thus is incompressible.
But what about other qualities like in-viscid, and irrotational? What do they mean? And why are they necessary?
 A: Bernoulli's equation is really like an energy conservation equation: if you multiply both sides by the mass flow $\dot{m}$ (also assumed constant) you get:
$$\frac12 \dot{m}v^2+\dot{m}gh+\dot{m}\frac{p}{d}=C$$
The terms are all energy per unit of time. The first one, $\frac12 \dot{m}v^2$, represents translational kinetic energy (per unit of time) of the fluid. But there's no term included for rotational kinetic energy (after all, fluid running through conduits rarely rotate!) So using Bernoulli we assume only translational motion of the fluid.
The equation applies only to inviscid fluids because fluids with significant viscosity experience viscous energy losses, which are not conserved: the energy lost due to viscous friction would have to be supplied, for example by extra pressure, to prevent deceleration ($\dot{m}$ decreasing).
A: I think a derivation of the Bernoulli equation will help clarify things. 
We begin with the Navier-Stokes equations 
$$\frac{\partial \vec{u}}{\partial t}+\vec{u}\cdot \vec{\nabla}\vec{u} =-\frac{1}{\rho} \vec{\nabla} p +\nu \nabla^2 \vec{u},$$
where $\rho$ is the density, $p$ the pressure, and $\nu$ the kinematic viscosity. The advective term can be rewritten as 
$$\vec{u}\cdot \vec{\nabla}\vec{u}=\vec{\nabla}(\frac{1}{2}\vec{u}\cdot \vec{u})-\vec{u}\times \vec{\omega}$$
where $\vec{\omega}=\vec{\nabla}\times \vec{u}$ is the vorticity. 
We can now examine this equation under a variety of different assumptions. 
For instance, let's assume the density is constant. Furthermore, we'll take the flow to be irrotational. 
By definition this means
$$\vec{\nabla}\times\vec{u}=0\implies \vec{u}=\vec{\nabla}\phi$$
for $\phi$ a scalar function. Finally take the flow the to be inviscid (i.e. $\nu =0$). 
With these assumptions the Navier-Stokes equations can be rewritten as
$$\vec{\nabla}\left(\frac{\partial \phi}{\partial t} + \frac{1}{2}\vec{u}\cdot\vec{u}+\frac{1}{\rho}p\right)=0.$$
This implies 
$$\frac{\partial \phi}{\partial t} + \frac{1}{2}\vec{u}\cdot\vec{u}+\frac{1}{\rho}p=B(t)$$
where $B$ is just a function of time. This is usually absorbed into $\phi$, but there are examples when one needs to pay attention to the value of the Bernoulli head (eg Whitham 1962). 
There are other simplifications (eg $u$ time independent, but possibly rotational) that one can also use to get a Bernoulli equation. 
Let me know if you have any questions,
Nick 
A: It can also be derived from Euler's equation of motion of a fluid element $dm$ moving (translating but NOT rotating) along a flow line through a conduit:

That equation (a balance of forces acting on the fluid element) is:
$$\frac{dp}{\rho g}+\frac{vdv}{g}+dh+\frac{d\sigma_w}{\rho g}=0$$
The fourth term is the shear stress term for a viscous fluid. For an inviscid fluid that term becomes zero, so:
$$\frac{dp}{\rho g}+\frac{vdv}{g}+dh=0$$
Integrated between two points along a flow line and assuming incompressibility ($\rho = \text{constant}$), we get:
$$\int_{p_1}^{p_2}\frac{dp}{\rho g}+\int_{v_1}^{v_2}\frac{vdv}{g}+\int_{h_1}^{h_2}dh=0$$
$$\implies \frac{p_2-p_1}{\rho g}+\frac{v_2^2-v_1^2}{2g}+(h_2-h_1)=0$$
Slightly reworked:
$$\frac{p_2}{\rho}+\frac12 v_2^2+gh_2=\frac{p_1}{\rho}+\frac12 v_1^2+gh_1$$
