I am in receipt of your photograph. Unfortunately, it is not sufficiently clear to render fine surface detail, so a definitive diagnosis cannot be inferred. Having said that, its relatively brief duration and its location do provide sufficient information to provide a differential diagnosis-- i.e., a list of likely diagnoses, and to exclude some others.
It should be said that a majority of oral ulcers take on a non-specific appearance-- that is, despite a rather diverse set of causes, they are often look similar, and cannot often be distinguished on appearance alone. What is informative is the clinical presentation-- i.e., their location, their setting (relationship with other oral structures), and most importantly, their behavior over time. For example, an ulcer that emerges quickly and disappears within a week or two has very different implications than an ulcer that lasts several months, or one that appears and disappears at the same location in a cyclical pattern.
In your case, the location of the ulcer near the middle of the palate implies that it is unrelated to the teeth, and therefore this is unlikely to be a fistula from a pulp or periodontal infection. Your photograph suggests that the ulcer is situated atop a bony prominence known as a "torus palatinus", which is a variable feature not present in all mouths. The presence of a torus tends to make the tissues covering its surface quite thin and fragile, and vulnerable to physical injury. If I had to submit the most likely diagnosis, it would be a traumatic ulcer (i.e., a physical injury to the soft tissues due to mechanical friction or puncture from sharp or rough food). And because this has been present for only four days, this presumptive diagnosis would be the most rational assumption, because the behavior of the lesion over the next few days would either confirm or refute it. Like any physical injury, this ulcer is likely to heal on its own, assuming you avoid oral activities that may tend to re-injure the area, such as consumption of hard food.
If the ulcer does not heal within a week's time, it would then be appropriate to assume there is something else to blame, and would require that you arrange for a visit to your dentist for a more formal diagnosis. There are several different conditions that could present in this way (for example, some exotic-sounding disorders such as necrotizing sialometaplasia or anti-resorptive osteonecrosis), but speculation does not serve a useful purpose at this time, because any dentist will recommend a suitable waiting time to see if the condition heals on its own before implementing more aggressive diagnostic efforts.
In the meantime, you may wish to seek symptomatic relief by using over-the-counter topical anesthetic products such as Anbesol or Zilactin (available for purchase at your local pharmacy), as well as oral analgesics such as ibuprofen or acetaminophen. Emphasis should be placed on avoiding vigorous chewing or consumption of hard or difficult-to-chew food, to give the area a rest and prevent re-injury. I would recommend that you wait no more than one week to see if this condition resolves spontaneously, and then seek professional care.
Hope this helps...