They are both used for user input. A JTextField has to be placed in a container (e.g. JPanel) and a container can have multiple JTextField's. JOptionPane pops up a small window where the user can enter their input. JOptionPane only has one input per popup (assuming you haven't created a custom version).
Also, JOptionPane has to popup for every entry an some button has to be clicked to accept an entry. This can get very annoying if you have multiple inputs to enter.
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.