First, you'll need Google Chrome as your browser. (Other browsers also have this feature.) Then install the translation bar extension. There are several translation extensions available. The one I've been using seems to work well. It is called Translation Bar by Tase.
Next, find a passage online and translate it to the foreign language you've been learning. Do this by hand using pencil and paper. Once done, you can check your translation by clicking on the translation bar icon. It will translate your passage for you and allow you to check your work. It is not perfect, but will give you a reasonable translation.
Just remember, you'll only hone your skills if you do the actual translation first, then check your work. You won't learn anything if you just let the Google extension do it for you.
You can also find passages online that are originally written in a foreign language. Try translating these back to English. Google Chrome will automatically detect web pages written in other languages and has an automatic translate feature for this. Again, you can do the translation by hand, then check your work.