More details would be helpful, but I'm thinking you want an ad to appear at the top of your home page above the first post and also at the top of each Page.
You may try a plugin like this one:
If that doesn't do what you want, you may need to modify your theme. Well, you'd actually want to create a child theme if you're not already using one, but that's another topic.
Most often WordPress themes use the index.php file as the template for the home page, and for "static" pages it's page.php. Or if you're referring to a single post, it would be single.php.
Of course, if the plugin does what you want that would be easier.