You're asking about relational db and normalization. In short, your tables are connected via IDs. A table typically has its own ID and other IDs that reference other tables.
In SQL, WHERE clause
helps to join tables while querying ..
like WHERE tablename1.id = tablename2.id
If you're still confused, show us few lines of code. We also need know your db structure, to help you, specifically. By the way, MSQL AB (mysql.net) already provides free comprehensive documentation for all the explaination. We all are ourselves reading that.
Support Indian students' finances http://scholarship.mediasworks.com/