Method 1: Create a Custom Module (No Coding)
This is the simplest method for displaying arbitrary content (like text, announcements, or custom HTML) in a module position.
  1. Log in to your Joomla administrator panel.
  2. Navigate to  Content > Site Modules.
  3. Click the New button in the toolbar.
  4. From the list of available module types, select Custom.
  5. Configure the module:
    • Enter a Title (e.g., "Announcement").
    • Use the content editor to add your text, images, or custom HTML.
    • Select a Position from the drop-down list to determine where it appears on your site's template (e.g., sidebar-right).
    • Set the Status to Published to make it visible.
    • In the Menu Assignment tab, choose "Only on the pages selected" to specify on which pages the module should be displayed.
  6. Click Save & Close. The new module should now appear on your site in the selected position.
 
Method 2: Develop a New Module (Advanced)
This method involves creating the necessary files to build a custom mini-application.
  1. Create a folder for your module in the modules directory of your Joomla installation (e.g., mod_firstmodule).
  2. Create the required files within your new folder:
    • mod_firstmodule.xml: Contains information about the module and the files to be installed.
    • mod_firstmodule.php: The main entry point for the module, which handles initialization and data collection.
    • helper.php: Contains a helper class to retrieve data.
    • index.html: An empty HTML file to prevent directory browsing.
    • tmpl folder containing default.php, which is the template file for displaying the module's output.
  3. Compress the entire mod_firstmodule folder into a single ZIP file.
  4. Install the module through the Joomla administrator panel by navigating to Extensions > Extension Manager, uploading your ZIP file, and clicking Upload & Install.
  5. Publish the installed module by going to Extensions > Modules, clicking New, selecting your new module type, and configuring its position and menu assignment as in Method 1.
For detailed steps and examples, refer to the Joomla! Programmers Documentation.