"To lock out" and "to lock in" differ in a very similar way to "get in" and "get out", actually. If I lock someone out, I have locked something such that they cannot get in (i.e., they are trapped outside the thing I locked). If I lock someone in, I have locked something such that they cannot get out (i.e., they are trapped inside the thing I locked).
This is reflected by the definition in Cambridge Learner's Dictionary:
lock sb in/out
to prevent someone from entering/leaving a room or building by locking the door
but the order they use is confusing -- "lock in" is to prevent from leaving, "lock out" is to prevent from entering.
You ask for "lock down", but I'm also going to include "lock up", since it's another lock + preposition phrasal verb that can be confusing. Unlike "lock in" and "lock out", "lock up" can take either a person or a thing as its object. When you lock something up, you're locking all the doors/windows/etc. of something, usually as you leave or go to sleep or something. When you lock someone up, you're locking them in somewhere -- usually a prison or something similar from which they cannot escape
"To lock down" typically takes a prison, school, or other important institution (like a governmental facility) as an object, and it describes elevated security measures in which you make the people involved (prisoners, students, etc.) stay locked inside their cells/rooms/etc. during an emergency for safety/security purposes. Police will "lock down" an area after a crime, for instance. It's also often described as "going on lockdown", particularly when it's a school involved, and many schools (at least in the US) have what are called "lockdown drills" where they practice locking down the school in case there's a school shooter or bomb threat.