Start with Google:
Protect my application with key[
^] and refine your search based on your language and target environment.
But...unless you are going to charge a heck of a lot for it, or you are going to sell huge numbers I wouldn't spend too long on the process. It's very easy to end up spending more in terms of your time on implementing protection that you would save in reduced piracy - and protection is a "red flag" for some people for whom hacking past it is a hobby. Look at Adobe: they spend a lot of money on protecting Photoshop, only for a cracked version to appear on torrent sites on the same day as it it released.
And beware over-protecting: it's easy to make life difficult for genuine users, and that can have a huge adverse effect on sales.