To answer the common question "How to make an ESP", I provide you this short guide:

External:
Make a GDI Overlay - This is pretty easy, here are 2 tutorials:
Counter Strike External GDI ESP Tutorial
Call of Duty 4 Modern Warfare External GDI ESP Tutorial

Little more difficult:
Make a openGL or direct3d overlay by making a transparent window and cover the game window with it

Internal:
Use either openGL or direct3d, whichever the game uses. The DLL's you need will already be loaded and you just call the exported functions from this DLL and if you call these functions from a hook it will act on the current rendering context.
OpenGL ESP Source Code and video explanation
Call of Duty 4 Modern Warfare Direct3D ESP Tutorial

You can also reverse engineer the games rendering functions and use them which in most cases is more difficult than just using directx or opengl.

Regardless of which method you use, you will need to:

Find the ViewMatrix

Use/Create a world 2 screen function that works for your game

What else?
To make an ESP you need to have an intermediate knowledge of the programming language you are using. You need to have the entity list and a function to parse this list. You need to learn the Graphics API you will be using before starting the ESP, follow some of the great tutorials on the internet to learn the basics. If you don't know what you're doing, stop and learn it first. The documentation is your best source of information, just like MSDN. You will need to learn some intermediate trigonometry, geometry and 3D game programming to understand how the World To Screen function works.

IF YOU CANNOT MAKE A SIMPLE TRAINER WITHOUT COPY/PASTE, LEARN HOW BEFORE DOING ESP