You have two options.
A) Meet landside
In this case you both will have to go through immigration and exit the secure area. You will need both full access credentials for Doha. Your friend will NOT have to collect bags, as they are checked through (assuming they travel on a single ticket).
You can meet in the arrival area or, given enough time, you can actually take transportation into town and hang out wherever you feel like. Doha is nice !
You will have to clear security again, when you go back to your gates.
B) Meet airside
For your friend this is very straight forward: they exit the plane, follow "connecting flights" go through security and are then in the airside terminal. That's the same procedure whether they meet with you or not.
Your trip is a little more complicated. Make sure you have boarding passes for both legs of your trip before you start. You should be able to check in online. If you have to go to a check in counter, they should be able to give you both boarding passes.
On arrival you can either go to the exit or to "connecting flights". Doha has security for all passengers going to connecting flights. I believe that they do check your connecting boarding pass at this point. They may or may not accept your return boarding pass at this point. If they don't, you have to exit through immigration (requiring full Qatar access credentials) turn around, go through exit immigration and security to go back into the terminal.
Once you are in the terminal area you can meet with your friend wherever you want. I believe Doha has only a single terminal and all the concourses are connected airside but this type of information is not very easy to confirm. If you want to be sure, book your flight with the same airline (or alliance) as your friend.