How does Log shipping knows to keep track I have set up log shipping between 2 SQL Servers (SQL Server 2008 and SQL Server 2012),

At first i took a full backup of the first one and restored it on the other one and than i set up the log shipping,

The databases first backup-restore took a few hours and i wish to know: 


how does the log shipping process knows from when to start the logs
it is shipping? does it start from when the last backup-restore process happened or from the moment the log shipping itself is set ? 
Can i be sure that no information was lost in these few hours ?


Thanks
You can use log shipping to send transaction logs from one database (the primary database) to another (the secondary database) on a constant basis. Continually backing up the transaction logs from a primary database and then copying and restoring them to a secondary database keeps the secondary database nearly synchronized with the primary database. 

Here is the answer of your questions 
- If configured correctly then log shipping software start from the point the last backup-restore process happened
- The Answer of your second question is really depends upon how you configure it.

As we are using red gate software and we are taking backup after every 15 minutes and in this way we can lost maximum of 15 minutes of data, as the secondary database nearly synchronized with the primary database.

hopw it will help.

You can read more Monitor Log Shipping