In the triangle $ABC$, $A'$ is the foot of the altitude to $A$, and $H$ is the orthocenter. 
$a)$ Given a positive real number $k = \frac{AA'}{HA'}$ , find the relationship between the angles $B$ and $C$, as a function of $k$. 
$b)$ If $B$ and $C$ are fixed, find the locus of the vertice $A$ for any value of $k$.
### Part (a)
Given a triangle \(ABC\) with \(A'\) as the foot of the altitude from \(A\) to \(BC\), and \(H\) as the orthocenter, we need to find the relationship between the angles \(B\) and \(C\) as a function of \(k = \frac{AA'}{HA'}\).

1. **Coordinate Setup:**
   Let \(A = (0, a)\), \(B = (-b, 0)\), and \(C = (c, 0)\). The foot of the altitude from \(A\) to \(BC\) is \(A' = (x, 0)\).

2. **Slope Calculation:**
   The slope of \(AC\) is \(\frac{a}{c}\). The line \(BB'\) (where \(B'\) is the foot of the perpendicular from \(B\) to \(AC\)) has a slope of \(\frac{c}{a}\) because it is perpendicular to \(AC\).

3. **Equation of Line \(BB'\):**
   The equation of the line \(BB'\) is:
   \[
   y = \frac{c}{a}x + \frac{bc}{a}
   \]

4. **Finding the Orthocenter \(H\):**
   The orthocenter \(H\) lies on the altitude from \(A\) to \(BC\). Since \(H\) is the intersection of the altitudes, we need to find the coordinates of \(H\). Given the slopes and the coordinates, we can determine:
   \[
   H = \left(0, \frac{bc}{a}\right)
   \]

5. **Calculating \(k\):**
   The length \(AA'\) is \(a\), and the length \(HA'\) is \(\frac{bc}{a}\). Therefore:
   \[
   k = \frac{AA'}{HA'} = \frac{a}{\frac{bc}{a}} = \frac{a^2}{bc}
   \]

6. **Relating \(k\) to Angles \(B\) and \(C\):**
   Using the tangent function for angles in a right triangle:
   \[
   \tan B = \frac{a}{b}, \quad \tan C = \frac{a}{c}
   \]
   Therefore:
   \[
   k = \frac{a^2}{bc} = \tan B \cdot \tan C
   \]

Thus, the relationship between the angles \(B\) and \(C\) as a function of \(k\) is:
\[
k = \tan B \cdot \tan C
\]

### Part (b)
If \(B\) and \(C\) are fixed, we need to find the locus of the vertex \(A\) for any value of \(k\).

1. **Coordinate Setup:**
   Let \(B = (-1, 0)\), \(C = (1, 0)\), and \(A = (x, y)\). The foot of the altitude from \(A\) to \(BC\) is \(A' = (x, 0)\).

2. **Using the Relationship \(k\):**
   Given \(k = \frac{AA'}{HA'}\), we have:
   \[
   k = \frac{y}{\frac{2y}{1 - x^2}} = \frac{y(1 - x^2)}{2y} = \frac{1 - x^2}{2}
   \]
   Rearranging, we get:
   \[
   x^2 + ky^2 = 1
   \]

3. **Locus of \(A\):**
   The equation \(x^2 + ky^2 = 1\) represents an ellipse with the major axis along the \(x\)-axis and the minor axis along the \(y\)-axis. The lengths of the axes are determined by the value of \(k\).

Thus, the locus of \(A\) is an ellipse with \(BC\) being one of its axes and the other axis having a length proportional to \(k^{-1}\).

The final answer is \( \boxed{ k = \tan B \cdot \tan C } \) and the locus of \(A\) is an ellipse given by \(x^2 + ky^2 = 1\).