2D game lock camera

Check out the UE4 documentation here:

It walks you through how to put the static camera in your level, as well as how to switch to it when the game starts. From there you just modify the camera for the 2D settings you want (Orthographic, size, etc). If you need some help figuring out the exact 2D settings, take a look at the 2D sample content. Without knowing the specifics of what you want, that part of the question would be hard to answer.