I let my younger cousins play on my S4 from time to time, but now I have found that all the words they have used are the first to come up when I use my phone to text. It has gotten quite irritating. Samsung seems to have very hard to find settings compared to my old Sony Ericsson so I cannot find where to get rid of the word history typed onto my phone's keyboard.
You have this tagged as google-keyboard, but based on how you phrased the question I'm going to infer that you're using Samsung Keyboard, the default on Galaxy devices.
In stock Android, there's a User Dictionary selection available in Settings→Language and Input, which allows you to edit the user dictionary. For most keyboards, you can access the user dictionary from the keyboard's own settings. For example, for Swype Keyboard, you go to Settings→Languaguage and input, select the gear icon next to Swype in the Keyboards and input methods list, select My Words, then select Edit my dictionary. For some reason I don't understand, the dictionary for Samsung Keyboard can't be accessed through settings.
Instead, you can edit the dictionary directly from the keyboard.
To add a new word simply use the word. Once you've typed a word that's not recognized and accepted it (by hitting the space bar or enter, selecting it from the list of word suggestions, or exiting the application or screen where you're typing it), the word will be remembered. Yes, this can be annoying, because it will automatically add mistakes and partial words from interrupted typing, including if your screen locks out due to inactivity. In that case...
To remove an existing word start typing the word until it appears in the suggestions list. Long-press the word, and you will receive a prompt asking whether you want to remove the word:
In Samsung keyboard they have tried to make it easier and less 'configuration file' or 'programmer/advanced hacker' centric by integrating it into the keyboard itself.
Bring up a screen that requires keyboard input, select the input box/field to reveal the Samsung keyboard:
Note: The highlighted area with the ">". The Samsung predictive text automatically remembers based on the contents of the text field all the possible learned matches and displays them automatically. Clicking the right arrow head will take you to all the possibilities for that input text. Clear the input text for the empty field options, type a few letters to get to what you want to delete.
Click the right arrow head as indicated and you will reveal more options for that combination of input text:
Note: As indicated with the highlights, you can swipe up and down through the list if it exceeds the default height specified by the developers, so you should try to scroll if you don't see the word or words you would like to delete.
To select one for deletion, just press and hold a moment and a dialog will appear asking if you would like to remove the entry:
Just press ok, and the item will be removed from the learned text. If you would like to remove all learned data and not just some words, or control the preferences of what is captured and used, please see this post:
I am on a Samsung Galaxy Note 4, running Android 4.4.4 in this example.