The first quotation -- that "we live meanly, like ants" -- implies that we lead the same kind of routine, mindless lives that we think of ants as leading. We don't truly consider what we're doing; we simply go about the tasks that we always have without really questioning the value of the tasks or if they make us feel happy and fulfilled. Each day, ants will go to gather food, they might build within their colony, and so forth, but we don't think of them as doing so thoughtfully. They don't seem to feel, as a species, that they have other options, and we are the same way -- though we do have other options. We could choose to opt out of the monotonous routine, the way Thoreau does when he moves to Walden to "suck out all the marrow of life." He doesn't want to live each day by rote; he wants to make each day new, something most men (and ants) do not do.
The second quotation -- that "our lives are frittered away by detail" -- refers to one of Walden's main ideas: that we need to simplify our lives in order to truly live them. For example, if we believe that we want things, whatever those things are, then we have to work harder to earn money to buy the things, and then we need to work harder to buy a bigger house to put the things in, and then we have to work harder to clean and heat and maintain that house that we bought for our things, and so on. The more detail in our lives, the more bogged down by the details our lives get. If we live simply, stripping extraneous detail away, then it leaves time for us to focus on the things we really enjoy -- probably not working more, but reading more, spending time with friends more, being outside more, living more.
The main point of these quotes is that people need to live a simple life.
The reason that Thoreau went to Walden in the first place is because he wanted to live closer to nature and in a way that was not so materialistic as he thought that contemporary society was becoming. He believed that an obsession with material things prevented people form focusing on what was really important.
Both of the quotes you cite illustrate this idea. In the same passage where he says these things, he argues that the really important things in life can be numbered on ten fingers or, in extreme cases, the fingers and toes.
Specifically, I believe the first quote means that we spend our lives running around frantically like ants when we really don't need to. The second quote means that we spend too much time on details -- things that don't really matter in the greater scheme of things.
So, instead of frittering away our lives slaving away like ants trying to get more things, we should concentrate on what is really important in life.