First off, congratulations! I bought my first house late last year and know ALL of the range of emotions you are going through. The house is now starting to finally feel like my home, but there are a lot of things I still want to do with it. (I bought in September and winter quickly moved in so I haven't had a chance to clean up the exterior like i wanted to. Hopefully spring comes soon).
Anyway, once you make the offer on the house that is when the inspection will take place. Make CERTAIN that your offer is dependent upon satisfactory completion of the inspection. I.E. make it so that if the inspection turns up a lot of things that you don't want to deal with that you are able to withdraw your offer because of it. When I bought my house, the inspection showed that the chimney was falling away from the house and that the water pump was corroded and needed replacement. I had an "out" in my agreement if I wanted to, but the sellers were willing to pay for the repairs so I had no problems.
An inspection will also inform you of little things that you will want to pay attention to once you move in. For me, it alerted me to some electrical "fix-ups" that I would need to do and some plumbing work. I could have asked the sellers to fix that stuff, but I needed/wanted to learn how to do it myself so I didn't make them fix it and have learned a lot by fixing it myself. (I've actually become VERY handy since moving into my house).
Another piece of advice is to have your attorney highlight for you anything on your HUD-1 that you'll need to be aware of when filing taxes next year. My attorney did an INCREDIBLE job of highlighting EVERYTHING on that HUD-1 that I could claim on my taxes. It was a huge help to me as there were items that I didn't realize I could claim, but was actually able to. I got myself a VERY nice refund this year from federal and state and was able to buy myself a laptop and a few power tools that I wanted.

When you have your inspection, it is also a good idea to have a radon test done. This is especially true if you plan on spending a lot of time in your basement as that is where radon tends to collect.