Some of these codex entries you will get automatically (when recruiting a new crew member for instance) and for others you will have to use the "Investigate" option during conversations with certain characters. Following up I will list the different entries and what you have to do to acquire them.
Council Races:
============
Asari - automatically unlocks when you meet with the council for the first time.
Turian - automatically unlocks right at the beginning when you talk to Nihlus in Normandy's cockpit.
Salarian - automatically unlocks when you meet with the council for the first time.
Extinct Races:
===========
Protheans - before you reach Eden Prime you'll find yourself in a conversation with
Nihlus and Captain Anderson. Use the Investigate option and select "Protheans".
Rachni - talk to the Avina terminal near the Krogan statue close to the Citadel
Emporium. Use the Investigate option and select "Rachni Wars".
Non-Council Races:
================
Batarian - after becoming a Spectre and before leaving the Citadel you have to talk
to Captain Anderson about Saren and previous missions. Select "You worked with the
Spectres". If you missed this one you can also get it later in ambassador Udina's office.
Anderson will be there most of the time.
Elcor - next to the human embassy on the Citadel is the embassy of the Elcor and
Volus. Talk to ambassador Calyn and after selecting the Investigate option ask him
about the Elcor race.
Volus - same embassy as the Elcor. Talk to Din Korlack and ask him about the
Volus race after selecting the Investigate option.
Geth - in the conversation with Ashley shortly after you pick her up on
Eden Prime, select Investigate and ask her about the "Geth".
Hanar - in the Citadel Emporium ask the Hanar shopkeeper about his speech after selecting the Investigate option.
Keepers - before meeting with the council for the first time talk to the Avina
terminal right in front of the Citadel Tower and next to one of the Keepers.
Use the Investigate option and select "Keepers".
Quarian - automatically unlocks when Tali is recruited.
Krogan - automatically unlocks when Wrex is recruited.