Ok, well let's start with one basic fact: you have two copies of every gene in your body. One copy you inherit from your mother and one copy you inherit from your father. Why do we need two copies of each gene? Well, one reason is redundancy. If one copy happens to be bad, the other can function just as well (see example below).
Now, how does this relate to hair color? Well, let's take a simple example to show how recessive traits work. Let's say a single gene that determines hair color. One version of this gene, let's call it B, gives your body the ability to produce the pigment that colors your hair brown. Let's also say that there's a defective version of this gene, b. Now, because everyone has two copies of the hair color gene, there are three possible sittuations. 1) A person can have two working copies of B (BB). In this case, the person will have brown hair because the genes will let this person produce the brown hair color pigment. 2) A person can have one working copy of the gene and one defective copy (Bb). Although one copy is defective, the working copy of the hair color gene is sufficient to produce enough of the pigment to color the person's hair brown. (it would seem to make sense that a Bb person would have a lighter shade of brown hair than a BB individual, but with genes this is often not the case. Most of the time, your body has self-control mechanisms that limit the actions of genes so that extra copies of the gene do not cause problems. As an analogy, consider that your car's speedometer may go up to 200mph but laws [and your sanity] make it so that most of the time you drive well below the maximum possible speed of your car). 3) A person has two defective copies of the gene (bb). Now, because neither copy of the gene can produce the brown pigment, the person has unpigmented, blond hair. Because a person who has at least one copy of the B version has brown hair, we call this type of gene version "dominant": it is strong enough that one copy is sufficient for its trait to show. Similarly, we call the b version "recessive", because the action of the b gene is hidden unless an individual has two copies of the gene.
Now let's say you and your husband both fall into case 2 (Bb). In this case, you would both have brown hair. Now, remember that I said each person inherits one version of each gene from their father and one version of each gene from their mother. So, your daughter will have one of your hair color genes and one of your husband's hair color genes. If your daughter were to inherit your b gene and your husband's b gene, she would fall into the bb (blond hair) category despite both her parents having brown hair. So, yes, you don't have to worry that the hospital switched your baby with someone else's.
I should mention that while this example explains the concept and is true for many genetic traits, I'm not sure if this is what actually happens with hair color. But, I hope it at least explains the principle well.