When you click on an assignment you will be taken to a new page. The top of that page will have the instructions for the assignment. Underneath that will be a table showing the assignment's due date, and the status of your submission for the assignment. You can always check here to make sure that Moodle actually got what you submitted. You can also see your grade here, once the assignment is graded.
If you haven't yet submitted anything for the assignment, the next thing down the page is a button marked "Add submission". Clicking that button will take you to a page where you can enter online text (if the assignment calls for that) or upload a file or files (if the assignment calls for that).
To enter online text, just type it (or copy-and-paste it) into the box provided. Copying and pasting is generally safer—if you write your text in (say) Microsoft Word and copy-and-paste into Moodle's text box, then you still have your answer if something goes wrong with Moodle's submission process.
Uploading a file (or files) is even simpler. Just drag and drop.
When you're satisfied with your submission, click the "Save changes" button at the bottom of the page! If you don't click "Save changes", Moodle will figure that you decided not to submit at this time, and won't save your work.
If you want to make changes to your submission (and the assignment is set to allow that), you can go back to the original assignment page. You'll see that the "Add submission" button is now marked "Edit submission". Click it, and you'll be taken to the same page where you originally entered your submission. Make your changes, and click "Save changes" again.