Slightly complex to answer, as we don’t have a lot of information here. It will depend on whether your app is a web app, a mobile app, etc. Many third-party libraries provide great support for this, depending on the language your app is written in.
If you’re building a mobile app using Fabric, then the iOS and Android Twitter Kit code provides simple and easy Login with Twitter functionality which enables you to have a user authenticate and then your app can act as that user account. For a web app, you’d need to do a three-legged flow to have the user login and redirect back to your app with a token.
We provide a wide variety of code samples on our TwitterDev Gallery - perhaps you will find something useful there.