which condition from question to select for which hypothesis test? I'm learning statistics and having hard times understanding hypothesis.
Suppose we are testing the hypothesis that sugar is linked to obesity. Which will be for what type of hypothesis.
for example-
H0: Yes, sugar is linked to obesity and
H1: No, sugar is not linked to obesity  or
H0: No, sugar is not linked to obesity and
H1: Yes, sugar is linked to obesity.
Another example(from an exam):
"Select the hypothesis formulation and the corresponding best values for α, in a Judiciary Scenario so as to avoid punishing an innocent in lieu of which it’s okay to pronounce a real case of guilty as not guilty:"
answer is: H0 : Defendant is Innocent, H1 : Defendant is not Innocent, α = 1%
I'm confused between which condition to select for what hypothesis and also how to select confidence intervals.
 A: In statistics Null Hypothesis i.e. H0 usually states that two variables ( in your case sugar and obesity ) are not related or there is no association between them. So for this case, the correct hypothesis should be -
H0: No, sugar is not linked to obesity
H1: Yes, sugar is linked to obesity.
Since now it's easy for you to state the Null hypothesis, all other statements about variables association become part of H1, H2, .... Hn hypothesis.
Now talking about confidence intervals - 
This concept emerges from the case where you compare a set of hypothesis to figure out which one is correct. The way you do it is using data given to you in various forms. You draw conclusions by doing various hypothesis-testing/statistical measures. These conclusions involve calculating certain variables/numbers based on various formulae ( just for example sake: t-test etc ).
Now, these calculated numbers help in rejecting or accepting a certain hypothesis. But since we make certain assumptions about the inference that we are trying to do ( assumptions can be w.r.t the data, model etc) we can never be 100% accurate. Hence we try to find out how sure we are about these calculations ( aka a notion of being confident i.e confidence interval ). So it will totally depend on cases like in medical diagnosis even being 99% sure is not enough hence you need to be REALLY CONFIDENT in this domain. But certain other domains might not be so rigorous and you could maybe go with 95,90 or even 85% confidence intervals.

Note: This is my first answer and I do hope I did a good job!
A: In inferential statistics, the null hypothesis is a general statement or default position that there is no relationship between two measured phenomena, or no association among groups. (e.g. sugar is not linked to obesity)
Testing (rejecting or disproving) the null hypothesis and thus concluding that there are grounds for believing that there is a relationship between two phenomena (e.g. sugar is linked to obesity) is the criteria for rejecting a null hypothesis.
The null hypothesis is generally assumed to be true until evidence indicates otherwise.
In you case it would be
Ho : Sugar is not linked to Obesity
Hi : Sugar is linked to Obesity
When your Probability value(p value) <= level of significance (alpa, usually 0.05),
We reject the null hypothesis, concluding sugar is linked to Obesity
Else we fails to reject the null hypothesis, concluding sugar is not linked to obesity
