Primary position is out in the lane. Where exactly it is depends on the road, of course. Its appropriate where you're going at a pace that isn't vastly slower than the rest of the traffic, i.e. on city roads thats most of the time! It means you're closer to the centre of the lane than to the side. Some people ride right in the middle, more ride a little left of centre. Its the place thats most visible and which requires most effort from the motorist in getting past you. It is important if you ARE in primary to avoid holding others up needlessly. Someone been stuck behind you for a while? Find a place where its safe to move over and let them go, its only polite. Generally, experienced cyclists find this by far the safest place to be on most busy roads.
Secondary position is no closer than eighteen inches from the kerb. Any closer than that and very often you're putting yourself at risk. Its appropriate where the traffic is much faster, and on many roads where there is poor visibility. You should never be so close to the kerb that motorists don't have to overtake you, i.e. if they don't have to pull out at all you're far too close to the kerb. In some ways secondary puts you at greater risk, in that people will try to overtake more closely, you're not as visible, and you're often out of the line of site of vehicles coming in from side roads. But on faster roads that risk is counterbalanced by the fact that faster traffic might struggle to overtake safely if you're in primary (and may struggle to slow down enough to avoid hitting you).
Hope this helps. Choice of where precisely in the lane to be should always depend on conditions and speed.