A take profit is a very similar tool to a stop loss, however, as the name suggests, it has the opposite purpose. Whilst a stop loss is designed to automatically close trades to prevent further losses, a take profit is designed to automatically close trades once they hit a certain profit level.
By having clear expectations for each trade, not only can you set a profit target, and, therefore, a take profit, but you can also decide what an appropriate level of risk is for the trade. Most traders would aim for at least a 2:1 reward-to-risk ratio, where the expected reward is twice the risk they are willing to take on a trade.
Therefore, if you set your take profit at 40 pips above your entry price, your stop loss would be set 20 pips below the entry price (i.e. half the distance).
In short, think about what levels you are aiming for on the upside, and what level of loss is sensible to withstand on the downside. Doing so will help you to maintain your discipline in the heat of the trade. It will also encourage you to think in terms of risk versus reward.