Please see also all the comments to the question...
... and please take care I'm not very familar with mssql syntax, therefore +- some semicolons can be wrong.
Anyway this should do what you need:
CREATE PROCEDURE RAISE_SALARY(@P_DEPARTMENT_ID NUMERIC)
AS
BEGIN
DECLARE @AVG_SALARY INT
SELECT @AVG_SALARY = AVG(SALARY)
FROM EMP_DETAILS
WHERE DEPARTMENT_ID = @P_DEPARTMENT_ID
UPDATE EMP_DETAILS
SET SALARY = SALARY + SALARY * 0.25
WHERE SALARY < @AVG_SALARY
AND DEPARTMENT_ID = @P_DEPARTMENT_ID
END
I hope it helps.