Hi,
To anchor objects in InDesign, please refer following link:
http://help.adobe.com/en_US/indesign/cs/using/WSa285fff53dea4f8617383751001ea8cb3f-6c43a.h tml
If images are anchored, they will appear in the EPUB after the paragraph in which they are anchored. To control the order of appearance of other objects, you can use articles panel and then choose reading order to be based on Articles Panel rather than page layout. This video will help you understand the workflow better: http://tv.adobe.com/watch/learn-indesign-cc/the-articles-panel/
Please feel free to ask in case you are stuck up or have further queries.
Regards,
Pooja