Viewing the DBMS_OUTPUT depends on the program.
SQL*Plus and Oracle SQL Developer
Run SET SERVEROUTPUT ON;
first. This is all that's necessary in SQL*Plus or recent versions of Oracle SQL Developer.
SET SERVEROUTPUT ON;
begin
dbms_output.put_line('Testing output');
end;
/
PL/SQL Developer
Output is automatically detected and displayed in the "Output" tab.