I'm looking for some app or program where I can put my own foreign language words (words I come across and I don't know them). Then I can learn them using some tests or repeating/drilling them.
Is there something like that?
I recommended AnkiDroid (disclaimer: I created it).
It is the Android version of Anki, a famous flashcards program.
You can enter all of the words you want.
Some dictionaries have some level of integration with it, which means that you can get automatic translations to have less writing to do for each flashcard, but frankly I never use it and always write both front and back for each flashcard.
It is gratis and open source, available on Google Play and F-Droid.
I used it to learn Japanese, entering each new words I wanted to learn. After several years I have entered 10.000 words into it by myself and I know almost all of them thanks to drilling.
You can try any flashcard program. The most popular opensource program which is freely available on most of the operating systems is Anki.