I'm a U.S. citizen and my boyfriend is from the UK. I am planning to visit him for 2 weeks. I will probably stay with him the first week in the UK. In the second week, if we wanted to take a side-trip to Spain for 3 days and he booked and paid for that flight separately, could I return back to the UK with him just with my U.S. passport, spend my last few days in the UK with him, and then go back to the U.S.? Or will the UK border officers require me to have a visa in order to return to the UK with him for those couple of days that I want to spend with him before I go home?
There is a questionaire that you can follow from UK Border Control Agency to find out whether or not you need a visa.
Generally speaking a US citizen doesn't need a visa to enter the UK. But your concern is that you will be re-entering after a trip to Spain. Normally you shouldn't have any problems unless your duration of stay is getting closer to 6 months. Which in your case it doesn't plus given that you are only staying a couple of days on your way back you have "proof of onward travel" which normally is sufficient.