Not really stupid questions.
There are lots of expenses in involved in buying and selling a house. Yes, if you sell for more than you paid... you'll have a "technical profit", but be aware there are closing costs that could easily eat-up some of those profits. In the 3-5 years, you'd be paying off a touch of the principle on the loan, and hopefully, the value of your home will have risen.
While you'd have the house for sale, you'd continue to live in the house until the actual closing date. In the meanwhile, if you plan on buying another property... you'd schedule the closing of the new house for the same day, just after you sell the first house, and move directly from one, to the other.